traceview 3.0.2-java → 3.0.3-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +39 -14
  3. data/Gemfile +4 -62
  4. data/Rakefile +23 -8
  5. data/gemfiles/frameworks.gemfile +40 -0
  6. data/gemfiles/libraries.gemfile +78 -0
  7. data/gemfiles/rails23.gemfile +47 -0
  8. data/gemfiles/rails30.gemfile +47 -0
  9. data/gemfiles/rails31.gemfile +47 -0
  10. data/gemfiles/rails32.gemfile +47 -0
  11. data/gemfiles/rails40.gemfile +35 -0
  12. data/gemfiles/rails41.gemfile +35 -0
  13. data/gemfiles/rails42.gemfile +35 -0
  14. data/lib/traceview/api/logging.rb +84 -38
  15. data/lib/traceview/frameworks/rails/inst/action_controller.rb +1 -1
  16. data/lib/traceview/inst/moped.rb +2 -2
  17. data/lib/traceview/util.rb +30 -34
  18. data/lib/traceview/version.rb +1 -1
  19. data/test/frameworks/apps/grape_nested.rb +3 -0
  20. data/test/frameworks/apps/grape_simple.rb +3 -0
  21. data/test/frameworks/apps/sinatra_simple.rb +3 -0
  22. data/test/frameworks/grape_test.rb +8 -4
  23. data/test/frameworks/padrino_test.rb +6 -2
  24. data/test/frameworks/rails2x_test.rb +3 -0
  25. data/test/frameworks/rails3x_test.rb +91 -0
  26. data/test/frameworks/rails4x_test.rb +89 -0
  27. data/test/frameworks/sinatra_test.rb +3 -0
  28. data/test/instrumentation/cassandra_test.rb +11 -4
  29. data/test/instrumentation/dalli_test.rb +3 -0
  30. data/test/instrumentation/em_http_request_test.rb +3 -0
  31. data/test/instrumentation/excon_test.rb +3 -0
  32. data/test/instrumentation/faraday_test.rb +3 -0
  33. data/test/instrumentation/http_test.rb +3 -0
  34. data/test/instrumentation/httpclient_test.rb +3 -0
  35. data/test/instrumentation/memcache_test.rb +9 -0
  36. data/test/instrumentation/memcached_test.rb +3 -0
  37. data/test/instrumentation/mongo_test.rb +14 -3
  38. data/test/instrumentation/moped_test.rb +29 -6
  39. data/test/instrumentation/rack_test.rb +3 -0
  40. data/test/instrumentation/redis_hashes_test.rb +187 -184
  41. data/test/instrumentation/redis_keys_test.rb +223 -220
  42. data/test/instrumentation/redis_lists_test.rb +225 -225
  43. data/test/instrumentation/redis_misc_test.rb +123 -120
  44. data/test/instrumentation/redis_sets_test.rb +216 -213
  45. data/test/instrumentation/redis_sortedsets_test.rb +245 -242
  46. data/test/instrumentation/redis_strings_test.rb +242 -238
  47. data/test/instrumentation/resque_test.rb +3 -0
  48. data/test/instrumentation/rest-client_test.rb +3 -0
  49. data/test/instrumentation/sequel_mysql2_test.rb +4 -1
  50. data/test/instrumentation/sequel_mysql_test.rb +4 -1
  51. data/test/instrumentation/sequel_pg_test.rb +4 -1
  52. data/test/minitest_helper.rb +25 -8
  53. data/test/profiling/method_test.rb +3 -0
  54. data/test/servers/rackapp_8101.rb +1 -1
  55. data/test/servers/rails2x_8140.rb +2 -2
  56. data/test/servers/rails3x_8140.rb +78 -0
  57. data/test/servers/rails4x_8140.rb +78 -0
  58. data/test/support/backcompat_test.rb +3 -0
  59. data/test/support/config_test.rb +3 -0
  60. data/test/support/dnt_test.rb +3 -0
  61. data/test/support/liboboe_settings_test.rb +3 -0
  62. data/test/support/tvalias_test.rb +3 -0
  63. data/test/support/xtrace_test.rb +3 -0
  64. metadata +19 -5
  65. data/Appraisals +0 -10
  66. data/gemfiles/mongo.gemfile +0 -33
  67. data/gemfiles/moped.gemfile +0 -33
@@ -1,310 +1,310 @@
1
+ # Copyright (c) 2015 AppNeta, Inc.
2
+ # All rights reserved.
3
+
1
4
  require 'minitest_helper'
2
- require "redis"
3
5
 
4
- describe "Redis Lists" do
5
- attr_reader :entry_kvs, :exit_kvs, :redis, :redis_version
6
+ if defined?(::Redis)
7
+ describe "Redis Lists" do
8
+ attr_reader :entry_kvs, :exit_kvs, :redis, :redis_version
6
9
 
7
- def min_server_version(version)
8
- unless Gem::Version.new(@redis_version) >= Gem::Version.new(version.to_s)
9
- skip "supported only on redis-server #{version} or greater"
10
+ def min_server_version(version)
11
+ unless Gem::Version.new(@redis_version) >= Gem::Version.new(version.to_s)
12
+ skip "supported only on redis-server #{version} or greater"
13
+ end
10
14
  end
11
- end
12
15
 
13
- before do
14
- clear_all_traces
16
+ before do
17
+ clear_all_traces
15
18
 
16
- @redis ||= Redis.new
19
+ @redis ||= Redis.new
17
20
 
18
- @redis_version ||= @redis.info["redis_version"]
21
+ @redis_version ||= @redis.info["redis_version"]
19
22
 
20
- # These are standard entry/exit KVs that are passed up with all moped operations
21
- @entry_kvs ||= { 'Layer' => 'redis_test', 'Label' => 'entry' }
22
- @exit_kvs ||= { 'Layer' => 'redis_test', 'Label' => 'exit' }
23
- end
23
+ # These are standard entry/exit KVs that are passed up with all moped operations
24
+ @entry_kvs ||= { 'Layer' => 'redis_test', 'Label' => 'entry' }
25
+ @exit_kvs ||= { 'Layer' => 'redis_test', 'Label' => 'exit' }
26
+ end
24
27
 
25
- it 'Stock Redis should be loaded, defined and ready' do
26
- defined?(::Redis).wont_match nil
27
- end
28
28
 
29
- it "should trace blpop" do
30
- min_server_version(2.0)
29
+ it "should trace blpop" do
30
+ min_server_version(2.0)
31
31
 
32
- @redis.lpush("savage", "zombie")
32
+ @redis.lpush("savage", "zombie")
33
33
 
34
- TraceView::API.start_trace('redis_test', '', {}) do
35
- @redis.blpop("savage")
34
+ TraceView::API.start_trace('redis_test', '', {}) do
35
+ @redis.blpop("savage")
36
+ end
37
+
38
+ traces = get_all_traces
39
+ traces.count.must_equal 4
40
+ traces[2]['KVOp'].must_equal "blpop"
41
+ traces[2]['KVKey'].must_equal "savage"
36
42
  end
37
43
 
38
- traces = get_all_traces
39
- traces.count.must_equal 4
40
- traces[2]['KVOp'].must_equal "blpop"
41
- traces[2]['KVKey'].must_equal "savage"
42
- end
44
+ it "should trace brpop" do
45
+ min_server_version(2.0)
43
46
 
44
- it "should trace brpop" do
45
- min_server_version(2.0)
47
+ @redis.lpush("savage", "the walking dead")
46
48
 
47
- @redis.lpush("savage", "the walking dead")
49
+ TraceView::API.start_trace('redis_test', '', {}) do
50
+ @redis.brpop("savage")
51
+ end
48
52
 
49
- TraceView::API.start_trace('redis_test', '', {}) do
50
- @redis.brpop("savage")
53
+ traces = get_all_traces
54
+ traces.count.must_equal 4
55
+ traces[2]['KVOp'].must_equal "brpop"
56
+ traces[2]['KVKey'].must_equal "savage"
51
57
  end
52
58
 
53
- traces = get_all_traces
54
- traces.count.must_equal 4
55
- traces[2]['KVOp'].must_equal "brpop"
56
- traces[2]['KVKey'].must_equal "savage"
57
- end
59
+ it "should trace brpoplpush" do
60
+ min_server_version(2.2)
58
61
 
59
- it "should trace brpoplpush" do
60
- min_server_version(2.2)
62
+ @redis.lpush("savage", "night of the walking dead")
61
63
 
62
- @redis.lpush("savage", "night of the walking dead")
64
+ TraceView::API.start_trace('redis_test', '', {}) do
65
+ @redis.brpoplpush("savage", "crawlies")
66
+ end
63
67
 
64
- TraceView::API.start_trace('redis_test', '', {}) do
65
- @redis.brpoplpush("savage", "crawlies")
68
+ traces = get_all_traces
69
+ traces.count.must_equal 4
70
+ traces[2]['KVOp'].must_equal "brpoplpush"
71
+ traces[2]['destination'].must_equal "crawlies"
66
72
  end
67
73
 
68
- traces = get_all_traces
69
- traces.count.must_equal 4
70
- traces[2]['KVOp'].must_equal "brpoplpush"
71
- traces[2]['destination'].must_equal "crawlies"
72
- end
74
+ it "should trace lindex" do
75
+ min_server_version(1.0)
73
76
 
74
- it "should trace lindex" do
75
- min_server_version(1.0)
77
+ @redis.lpush("fringe", "bishop")
78
+ @redis.lpush("fringe", "dunham")
79
+ @redis.lpush("fringe", "broyles")
76
80
 
77
- @redis.lpush("fringe", "bishop")
78
- @redis.lpush("fringe", "dunham")
79
- @redis.lpush("fringe", "broyles")
81
+ TraceView::API.start_trace('redis_test', '', {}) do
82
+ @redis.lindex("fringe", 1)
83
+ end
80
84
 
81
- TraceView::API.start_trace('redis_test', '', {}) do
82
- @redis.lindex("fringe", 1)
85
+ traces = get_all_traces
86
+ traces.count.must_equal 4
87
+ traces[2]['KVOp'].must_equal "lindex"
88
+ traces[2]['index'].must_equal 1
83
89
  end
84
90
 
85
- traces = get_all_traces
86
- traces.count.must_equal 4
87
- traces[2]['KVOp'].must_equal "lindex"
88
- traces[2]['index'].must_equal 1
89
- end
91
+ it "should trace linsert" do
92
+ min_server_version(2.2)
90
93
 
91
- it "should trace linsert" do
92
- min_server_version(2.2)
94
+ @redis.lpush("gods of old", "sun")
95
+ @redis.lpush("gods of old", "moon")
96
+ @redis.lpush("gods of old", "night")
93
97
 
94
- @redis.lpush("gods of old", "sun")
95
- @redis.lpush("gods of old", "moon")
96
- @redis.lpush("gods of old", "night")
98
+ TraceView::API.start_trace('redis_test', '', {}) do
99
+ @redis.linsert("gods of old", "BEFORE", "night", "river")
100
+ end
97
101
 
98
- TraceView::API.start_trace('redis_test', '', {}) do
99
- @redis.linsert("gods of old", "BEFORE", "night", "river")
102
+ traces = get_all_traces
103
+ traces.count.must_equal 4
104
+ traces[2]['KVOp'].must_equal "linsert"
105
+ traces[2]['KVKey'].must_equal "gods of old"
100
106
  end
101
107
 
102
- traces = get_all_traces
103
- traces.count.must_equal 4
104
- traces[2]['KVOp'].must_equal "linsert"
105
- traces[2]['KVKey'].must_equal "gods of old"
106
- end
108
+ it "should trace llen" do
109
+ min_server_version(1.0)
107
110
 
108
- it "should trace llen" do
109
- min_server_version(1.0)
111
+ @redis.lpush("gods of old", "sun")
112
+ @redis.lpush("gods of old", "moon")
113
+ @redis.lpush("gods of old", "night")
110
114
 
111
- @redis.lpush("gods of old", "sun")
112
- @redis.lpush("gods of old", "moon")
113
- @redis.lpush("gods of old", "night")
115
+ TraceView::API.start_trace('redis_test', '', {}) do
116
+ @redis.llen("gods of old")
117
+ end
114
118
 
115
- TraceView::API.start_trace('redis_test', '', {}) do
116
- @redis.llen("gods of old")
119
+ traces = get_all_traces
120
+ traces.count.must_equal 4
121
+ traces[2]['KVOp'].must_equal "llen"
122
+ traces[2]['KVKey'].must_equal "gods of old"
117
123
  end
118
124
 
119
- traces = get_all_traces
120
- traces.count.must_equal 4
121
- traces[2]['KVOp'].must_equal "llen"
122
- traces[2]['KVKey'].must_equal "gods of old"
123
- end
125
+ it "should trace lpop" do
126
+ min_server_version(1.0)
124
127
 
125
- it "should trace lpop" do
126
- min_server_version(1.0)
128
+ @redis.lpush("gods of old", "sun")
129
+ @redis.lpush("gods of old", "moon")
130
+ @redis.lpush("gods of old", "night")
127
131
 
128
- @redis.lpush("gods of old", "sun")
129
- @redis.lpush("gods of old", "moon")
130
- @redis.lpush("gods of old", "night")
132
+ TraceView::API.start_trace('redis_test', '', {}) do
133
+ @redis.lpop("gods of old")
134
+ end
131
135
 
132
- TraceView::API.start_trace('redis_test', '', {}) do
133
- @redis.lpop("gods of old")
136
+ traces = get_all_traces
137
+ traces.count.must_equal 4
138
+ traces[2]['KVOp'].must_equal "lpop"
139
+ traces[2]['KVKey'].must_equal "gods of old"
134
140
  end
135
141
 
136
- traces = get_all_traces
137
- traces.count.must_equal 4
138
- traces[2]['KVOp'].must_equal "lpop"
139
- traces[2]['KVKey'].must_equal "gods of old"
140
- end
142
+ it "should trace lpush" do
143
+ min_server_version(1.0)
141
144
 
142
- it "should trace lpush" do
143
- min_server_version(1.0)
145
+ TraceView::API.start_trace('redis_test', '', {}) do
146
+ @redis.lpush("gods of old", "night")
147
+ end
144
148
 
145
- TraceView::API.start_trace('redis_test', '', {}) do
146
- @redis.lpush("gods of old", "night")
149
+ traces = get_all_traces
150
+ traces.count.must_equal 4
151
+ traces[2]['KVOp'].must_equal "lpush"
152
+ traces[2]['KVKey'].must_equal "gods of old"
147
153
  end
148
154
 
149
- traces = get_all_traces
150
- traces.count.must_equal 4
151
- traces[2]['KVOp'].must_equal "lpush"
152
- traces[2]['KVKey'].must_equal "gods of old"
153
- end
155
+ it "should trace lpushx" do
156
+ min_server_version(2.2)
154
157
 
155
- it "should trace lpushx" do
156
- min_server_version(2.2)
158
+ TraceView::API.start_trace('redis_test', '', {}) do
159
+ @redis.lpushx("gods of old", "night")
160
+ end
157
161
 
158
- TraceView::API.start_trace('redis_test', '', {}) do
159
- @redis.lpushx("gods of old", "night")
162
+ traces = get_all_traces
163
+ traces.count.must_equal 4
164
+ traces[2]['KVOp'].must_equal "lpushx"
165
+ traces[2]['KVKey'].must_equal "gods of old"
160
166
  end
161
167
 
162
- traces = get_all_traces
163
- traces.count.must_equal 4
164
- traces[2]['KVOp'].must_equal "lpushx"
165
- traces[2]['KVKey'].must_equal "gods of old"
166
- end
167
-
168
- it "should trace lrange" do
169
- min_server_version(1.0)
170
-
171
- @redis.rpush("protein types", "structural")
172
- @redis.rpush("protein types", "storage")
173
- @redis.rpush("protein types", "hormonal")
174
- @redis.rpush("protein types", "enzyme")
175
- @redis.rpush("protein types", "immunoglobulins")
176
-
177
- TraceView::API.start_trace('redis_test', '', {}) do
178
- @redis.lrange("protein types", 2, 4)
168
+ it "should trace lrange" do
169
+ min_server_version(1.0)
170
+
171
+ @redis.rpush("protein types", "structural")
172
+ @redis.rpush("protein types", "storage")
173
+ @redis.rpush("protein types", "hormonal")
174
+ @redis.rpush("protein types", "enzyme")
175
+ @redis.rpush("protein types", "immunoglobulins")
176
+
177
+ TraceView::API.start_trace('redis_test', '', {}) do
178
+ @redis.lrange("protein types", 2, 4)
179
+ end
180
+
181
+ traces = get_all_traces
182
+ traces.count.must_equal 4
183
+ traces[2]['KVOp'].must_equal "lrange"
184
+ traces[2]['KVKey'].must_equal "protein types"
185
+ traces[2]['start'].must_equal 2
186
+ traces[2]['stop'].must_equal 4
179
187
  end
180
188
 
181
- traces = get_all_traces
182
- traces.count.must_equal 4
183
- traces[2]['KVOp'].must_equal "lrange"
184
- traces[2]['KVKey'].must_equal "protein types"
185
- traces[2]['start'].must_equal 2
186
- traces[2]['stop'].must_equal 4
187
- end
189
+ it "should trace lrem" do
190
+ min_server_version(1.0)
188
191
 
189
- it "should trace lrem" do
190
- min_server_version(1.0)
192
+ @redis.rpush("australia", "sydney")
193
+ @redis.rpush("australia", "sydney")
194
+ @redis.rpush("australia", "albury")
195
+ @redis.rpush("australia", "tamworth")
196
+ @redis.rpush("australia", "tamworth")
197
+ @redis.rpush("australia", "penrith")
191
198
 
192
- @redis.rpush("australia", "sydney")
193
- @redis.rpush("australia", "sydney")
194
- @redis.rpush("australia", "albury")
195
- @redis.rpush("australia", "tamworth")
196
- @redis.rpush("australia", "tamworth")
197
- @redis.rpush("australia", "penrith")
199
+ TraceView::API.start_trace('redis_test', '', {}) do
200
+ @redis.lrem("australia", -2, "sydney")
201
+ end
198
202
 
199
- TraceView::API.start_trace('redis_test', '', {}) do
200
- @redis.lrem("australia", -2, "sydney")
203
+ traces = get_all_traces
204
+ traces.count.must_equal 4
205
+ traces[2]['KVOp'].must_equal "lrem"
206
+ traces[2]['KVKey'].must_equal "australia"
201
207
  end
202
208
 
203
- traces = get_all_traces
204
- traces.count.must_equal 4
205
- traces[2]['KVOp'].must_equal "lrem"
206
- traces[2]['KVKey'].must_equal "australia"
207
- end
209
+ it "should trace lset" do
210
+ min_server_version(1.0)
208
211
 
209
- it "should trace lset" do
210
- min_server_version(1.0)
212
+ @redis.rpush("australia", "sydney")
213
+ @redis.rpush("australia", "albury")
214
+ @redis.rpush("australia", "tamworth")
215
+ @redis.rpush("australia", "penrith")
211
216
 
212
- @redis.rpush("australia", "sydney")
213
- @redis.rpush("australia", "albury")
214
- @redis.rpush("australia", "tamworth")
215
- @redis.rpush("australia", "penrith")
217
+ TraceView::API.start_trace('redis_test', '', {}) do
218
+ @redis.lset("australia", 2, "Kalgoorlie")
219
+ end
216
220
 
217
- TraceView::API.start_trace('redis_test', '', {}) do
218
- @redis.lset("australia", 2, "Kalgoorlie")
221
+ traces = get_all_traces
222
+ traces.count.must_equal 4
223
+ traces[2]['KVOp'].must_equal "lset"
224
+ traces[2]['KVKey'].must_equal "australia"
219
225
  end
220
226
 
221
- traces = get_all_traces
222
- traces.count.must_equal 4
223
- traces[2]['KVOp'].must_equal "lset"
224
- traces[2]['KVKey'].must_equal "australia"
225
- end
226
-
227
- it "should trace ltrim" do
228
- min_server_version(1.0)
229
-
230
- @redis.rpush("australia", "sydney")
231
- @redis.rpush("australia", "albury")
232
- @redis.rpush("australia", "tamworth")
233
- @redis.rpush("australia", "albury")
234
- @redis.rpush("australia", "tamworth")
235
- @redis.rpush("australia", "albury")
236
- @redis.rpush("australia", "tamworth")
237
- @redis.rpush("australia", "penrith")
238
-
239
- TraceView::API.start_trace('redis_test', '', {}) do
240
- @redis.ltrim("australia", 2, 6)
227
+ it "should trace ltrim" do
228
+ min_server_version(1.0)
229
+
230
+ @redis.rpush("australia", "sydney")
231
+ @redis.rpush("australia", "albury")
232
+ @redis.rpush("australia", "tamworth")
233
+ @redis.rpush("australia", "albury")
234
+ @redis.rpush("australia", "tamworth")
235
+ @redis.rpush("australia", "albury")
236
+ @redis.rpush("australia", "tamworth")
237
+ @redis.rpush("australia", "penrith")
238
+
239
+ TraceView::API.start_trace('redis_test', '', {}) do
240
+ @redis.ltrim("australia", 2, 6)
241
+ end
242
+
243
+ traces = get_all_traces
244
+ traces.count.must_equal 4
245
+ traces[2]['KVOp'].must_equal "ltrim"
246
+ traces[2]['KVKey'].must_equal "australia"
241
247
  end
242
248
 
243
- traces = get_all_traces
244
- traces.count.must_equal 4
245
- traces[2]['KVOp'].must_equal "ltrim"
246
- traces[2]['KVKey'].must_equal "australia"
247
- end
249
+ it "should trace rpop" do
250
+ min_server_version(1.0)
248
251
 
249
- it "should trace rpop" do
250
- min_server_version(1.0)
252
+ @redis.rpush("santa esmeralda", "house of the rising sun")
253
+ @redis.rpush("santa esmeralda", "don't let me be misunderstood")
254
+ @redis.rpush("santa esmeralda", "sevilla nights")
251
255
 
252
- @redis.rpush("santa esmeralda", "house of the rising sun")
253
- @redis.rpush("santa esmeralda", "don't let me be misunderstood")
254
- @redis.rpush("santa esmeralda", "sevilla nights")
256
+ TraceView::API.start_trace('redis_test', '', {}) do
257
+ @redis.rpop("santa esmeralda")
258
+ end
255
259
 
256
- TraceView::API.start_trace('redis_test', '', {}) do
257
- @redis.rpop("santa esmeralda")
260
+ traces = get_all_traces
261
+ traces.count.must_equal 4
262
+ traces[2]['KVOp'].must_equal "rpop"
263
+ traces[2]['KVKey'].must_equal "santa esmeralda"
258
264
  end
259
265
 
260
- traces = get_all_traces
261
- traces.count.must_equal 4
262
- traces[2]['KVOp'].must_equal "rpop"
263
- traces[2]['KVKey'].must_equal "santa esmeralda"
264
- end
266
+ it "should trace rpoplpush" do
267
+ min_server_version(1.2)
265
268
 
266
- it "should trace rpoplpush" do
267
- min_server_version(1.2)
269
+ @redis.rpush("santa esmeralda", "house of the rising sun")
270
+ @redis.rpush("santa esmeralda", "don't let me be misunderstood")
271
+ @redis.rpush("santa esmeralda", "sevilla nights")
268
272
 
269
- @redis.rpush("santa esmeralda", "house of the rising sun")
270
- @redis.rpush("santa esmeralda", "don't let me be misunderstood")
271
- @redis.rpush("santa esmeralda", "sevilla nights")
273
+ TraceView::API.start_trace('redis_test', '', {}) do
274
+ @redis.rpoplpush("santa esmeralda", "the gods of old")
275
+ end
272
276
 
273
- TraceView::API.start_trace('redis_test', '', {}) do
274
- @redis.rpoplpush("santa esmeralda", "the gods of old")
277
+ traces = get_all_traces
278
+ traces.count.must_equal 4
279
+ traces[2]['KVOp'].must_equal "rpoplpush"
280
+ traces[2]['KVKey'].must_equal "santa esmeralda"
281
+ traces[2]['destination'].must_equal "the gods of old"
275
282
  end
276
283
 
277
- traces = get_all_traces
278
- traces.count.must_equal 4
279
- traces[2]['KVOp'].must_equal "rpoplpush"
280
- traces[2]['KVKey'].must_equal "santa esmeralda"
281
- traces[2]['destination'].must_equal "the gods of old"
282
- end
284
+ it "should trace rpush" do
285
+ min_server_version(1.0)
283
286
 
284
- it "should trace rpush" do
285
- min_server_version(1.0)
287
+ TraceView::API.start_trace('redis_test', '', {}) do
288
+ @redis.rpush("boney m", "rasputin")
289
+ end
286
290
 
287
- TraceView::API.start_trace('redis_test', '', {}) do
288
- @redis.rpush("boney m", "rasputin")
291
+ traces = get_all_traces
292
+ traces.count.must_equal 4
293
+ traces[2]['KVOp'].must_equal "rpush"
294
+ traces[2]['KVKey'].must_equal "boney m"
289
295
  end
290
296
 
291
- traces = get_all_traces
292
- traces.count.must_equal 4
293
- traces[2]['KVOp'].must_equal "rpush"
294
- traces[2]['KVKey'].must_equal "boney m"
295
- end
297
+ it "should trace rpushx" do
298
+ min_server_version(1.0)
296
299
 
297
- it "should trace rpushx" do
298
- min_server_version(1.0)
300
+ TraceView::API.start_trace('redis_test', '', {}) do
301
+ @redis.rpushx("boney m", "rasputin")
302
+ end
299
303
 
300
- TraceView::API.start_trace('redis_test', '', {}) do
301
- @redis.rpushx("boney m", "rasputin")
304
+ traces = get_all_traces
305
+ traces.count.must_equal 4
306
+ traces[2]['KVOp'].must_equal "rpushx"
307
+ traces[2]['KVKey'].must_equal "boney m"
302
308
  end
303
-
304
- traces = get_all_traces
305
- traces.count.must_equal 4
306
- traces[2]['KVOp'].must_equal "rpushx"
307
- traces[2]['KVKey'].must_equal "boney m"
308
309
  end
309
310
  end
310
-