Browse files

trace_id test.

  • Loading branch information...
1 parent 2e43b9e commit ac17ae0796fcf512435c8cca19c7c5b5000e6e89 @arohter arohter committed Jan 13, 2014
Showing with 9 additions and 2 deletions.
  1. +9 −2 spec/client_spec.rb
View
11 spec/client_spec.rb
@@ -59,11 +59,18 @@ def setup_zk
it 'should always include db' do
opts = {:zkservers => 'localhost:1234'}
client = ClientStub.new(opts)
- client.inspect.should match('<RedisFailover::Client .* \(db: 0,')
+ client.inspect.should match('<RedisFailover::Client \\[.*\\] \(db: 0,')
db = '5'
opts.merge!(:db => db)
client = ClientStub.new(opts)
- client.inspect.should match("<RedisFailover::Client .* \\(db: #{db},")
+ client.inspect.should match("<RedisFailover::Client \\[.*\\] \\(db: #{db},")
+ end
+
+ it 'should include trace id' do
+ tid = 'tracer'
+ opts = {:zkservers => 'localhost:1234', :trace_id => tid}
+ client = ClientStub.new(opts)
+ client.inspect.should match("<RedisFailover::Client \\[#{tid}\\] ")
end
end

0 comments on commit ac17ae0

Please sign in to comment.