Skip to content

Commit

Permalink
fix: Format gat commands (#1312)
Browse files Browse the repository at this point in the history
* fix: Format gat commands

* fix: skip test unless it implements gat

Co-authored-by: Francis Bogsanyi <[email protected]>

---------

Co-authored-by: Francis Bogsanyi <[email protected]>
  • Loading branch information
robertlaurin and fbogsany authored Jan 14, 2025
1 parent 00d379c commit 06c8de0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ module Utils
'multi_add' => 'addq',
'multi_replace' => 'replaceq',
'multi_delete' => 'deleteq',
'touch' => 'touch'
'touch' => 'touch',
'gat' => 'gat'
# 'sasl_authentication' => 'auth_negotiation',
# 'sasl_authentication' => 'auth_request',
}.freeze
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@
_(span.name).must_equal 'set'
_(span.attributes['db.statement']).must_equal 'set ?'
end

it 'supports gat' do
skip unless dalli.respond_to?(:gat)

dalli.gat('foo')

_(exporter.finished_spans.size).must_equal 1
_(span.name).must_equal 'gat'
_(span.attributes['db.statement']).must_equal 'gat foo 0'
end
end

# Dalli 3.x has different behavior than 2.x versions and attempts to retry on network errors
Expand Down

0 comments on commit 06c8de0

Please sign in to comment.