couchbase-jruby-client 0.1.8-java → 0.1.9-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c0ea141997ee6f37bc481a1c7eb4d62448440b5
4
- data.tar.gz: 218d1e6e80321f9a7a6efc229fca2d8e0d2e4e76
3
+ metadata.gz: 1ff8556640816f6cb67c87afb0aaeb5fc7001f2f
4
+ data.tar.gz: 08314e3ea7bec37d1010bad128a106fb61c73127
5
5
  SHA512:
6
- metadata.gz: 661cc5eec9882f541ad4441a20e9af2c4d92422a388b9dab2e6d1917d074ab47623a2e84beda34ed5f7bed1f775d0227bbc769d5dc3e910c33f2ecd1882c38e3
7
- data.tar.gz: 35dadabf6e5238f9926c7b6ff52357253f3d8ccccc68026c89c6a70fabe0c30d6ec9d2ce5ab88183b344d9238164321b4cb60c6cfc93b4e8ce26d1be6ae9196e
6
+ metadata.gz: 1c6218643d51c032b95aad0cb00944c617eb79c753fe095a4ae8f909be2ceb83e838aa629f9da3751a97862c9e1b18b645fd017bd88f9297f529aed6e74141ad
7
+ data.tar.gz: 46970dc0dcf1342ff99982058d5b768c28f3d57b66b4bd93d8f1732b5bf96146b094d13914bd06222b6d6e3507a34d27483c875f9a5b280c1dccac8a17b109d1
@@ -69,22 +69,6 @@ module Couchbase
69
69
  end
70
70
  end
71
71
 
72
-
73
- # @option params [true, false] :quiet (true) Do not raise error if
74
- # associated document not found in the memory. If the parameter +true+
75
- # will use +nil+ value instead.
76
- # @option params [String, Symbol] :on_error (:continue) Sets the
77
- # response in the event of an error. Supported values:
78
- # :continue:: Continue to generate view information in the event of an
79
- # error, including the error information in the view
80
- # response stream.
81
- # :stop:: Stop immediately when an error condition occurs. No
82
- # further view information will be returned.
83
- # @option params [Fixnum] :connection_timeout (75000) Timeout before the
84
- # view request is dropped (milliseconds)
85
-
86
-
87
- # @option params [Hash] :body
88
72
  query
89
73
  end
90
74
 
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module Couchbase
19
- VERSION = '0.1.8'
19
+ VERSION = '0.1.9'
20
20
  end
@@ -27,7 +27,9 @@ module Couchbase
27
27
 
28
28
  def doc
29
29
  {
30
- 'meta' => nil,
30
+ 'meta' => {
31
+ 'id' => self['id']
32
+ },
31
33
  'value' => document
32
34
  }
33
35
  end
data/test/setup.rb CHANGED
@@ -65,7 +65,7 @@ end
65
65
 
66
66
  $mock = start_mock
67
67
 
68
- Dir.glob('test/test_store.rb').each { |test| require test }
68
+ Dir.glob('test/test_*.rb').each { |test| require test }
69
69
  exit_code = Minitest.run(ARGV)
70
70
  Couchbase.disconnect
71
71
  $mock.stop
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestArithmetic < MiniTest::Test
20
+ class TestArithmetic < Minitest::Test
21
21
 
22
22
  def test_trivial_incr_decr
23
23
  cb.set(uniq_id, 1)
data/test/test_async.rb CHANGED
@@ -17,283 +17,8 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestAsync < MiniTest::Test
20
+ class TestAsync < Minitest::Test
21
21
 
22
- def test_result_object_provides_enough_info
23
- obj = Couchbase::Result.new
24
- assert obj.respond_to?(:success?)
25
- assert obj.respond_to?(:error)
26
- assert obj.respond_to?(:key)
27
- assert obj.respond_to?(:value)
28
- assert obj.respond_to?(:node)
29
- assert obj.respond_to?(:cas)
30
- end
31
22
 
32
- def method_name
33
-
34
- end
35
23
 
36
- # def test_it_requires_block_for_running_loop
37
- # refute cb.async?
38
- # assert_raises(LocalJumpError) do
39
- # cb.run
40
- # end
41
- # cb.run do |conn|
42
- # assert conn.async?
43
- # end
44
- # end
45
-
46
- # def test_it_resets_async_flag_when_raising_exception_from_callback
47
- # assert_raises(RuntimeError) do
48
- # cb.run do |conn|
49
- # conn.set(uniq_id, "foo") { raise }
50
- # end
51
- # end
52
- # refute cb.async?
53
- # end
54
-
55
- # def test_nested_async_get_set
56
- # cb.set(uniq_id, {"bar" => 1})
57
- # cb.set(uniq_id(:hit), 0)
58
-
59
- # cb.run do |conn|
60
- # conn.get(uniq_id) do
61
- # conn.get(uniq_id(:hit)) do |res|
62
- # conn.set(uniq_id(:hit), res.value + 1)
63
- # end
64
- # end
65
- # end
66
-
67
- # val = cb.get(uniq_id(:hit))
68
- # assert_equal 1, val
69
- # end
70
-
71
- # def test_nested_async_set_get
72
- # val = nil
73
-
74
- # cb.run do |conn|
75
- # conn.set(uniq_id, "foo") do
76
- # conn.get(uniq_id) do |res|
77
- # val = res.value
78
- # end
79
- # end
80
- # end
81
-
82
- # assert_equal "foo", val
83
- # end
84
-
85
- # def test_nested_async_touch_get
86
- # cb.set(uniq_id, "foo")
87
- # success = false
88
- # val = nil
89
-
90
- # cb.run do |conn|
91
- # conn.touch(uniq_id, :ttl => 1) do |res1|
92
- # success = res1.success?
93
- # conn.get(uniq_id) do |res2|
94
- # val = res2.value
95
- # end
96
- # end
97
- # end
98
-
99
- # assert success
100
- # assert_equal "foo", val
101
- # sleep(2)
102
- # assert_raises(Couchbase::Error::NotFound) do
103
- # cb.get(uniq_id)
104
- # end
105
- # end
106
-
107
- # def test_nested_async_delete_get
108
- # cas = cb.set(uniq_id, "foo")
109
- # success = false
110
- # val = :unknown
111
-
112
- # cb.run do |conn|
113
- # conn.delete(uniq_id, :cas => cas) do |res1|
114
- # success = res1.success?
115
- # conn.get(uniq_id, :quiet => true) do |res2|
116
- # val = res2.value
117
- # end
118
- # end
119
- # end
120
-
121
- # assert success
122
- # refute val
123
- # end
124
-
125
- # def test_nested_async_stats_set
126
- # skip
127
- # stats = {}
128
-
129
- # cb.run do |conn|
130
- # conn.stats do |res1|
131
- # id = uniq_id(res1.node, res1.key)
132
- # stats[id] = false
133
- # conn.set(id, res1.value) do |res2|
134
- # stats[id] = res2.cas
135
- # end
136
- # end
137
- # end
138
-
139
- # stats.keys.each do |key|
140
- # assert stats[key].is_a?(Numeric)
141
- # end
142
- # end
143
-
144
- # def test_nested_async_flush_set
145
- # skip
146
- # cas = cb.set(uniq_id, "foo")
147
- # res = {}
148
-
149
- # cb.run do |conn|
150
- # conn.flush do |res1|
151
- # assert res1.success?, "Expected: successful status code.\nActual: #{res1.error.inspect}"
152
- # id = uniq_id(res1.node)
153
- # res[id] = false
154
- # conn.set(id, true) do |res2|
155
- # res[id] = res2.cas
156
- # end
157
- # end
158
- # end
159
-
160
- # assert_raises(Couchbase::Error::NotFound) do
161
- # cb.get(uniq_id)
162
- # end
163
- # res.keys.each do |key|
164
- # assert res[key].is_a?(Numeric)
165
- # assert cb.get(key)
166
- # end
167
- # end
168
-
169
- # def test_nested_async_incr_get
170
- # skip
171
- # cas = cb.set(uniq_id, 1)
172
- # val = nil
173
-
174
- # cb.run do |conn|
175
- # conn.incr(uniq_id) do
176
- # conn.get(uniq_id) do |res|
177
- # val = res.value
178
- # end
179
- # end
180
- # end
181
-
182
- # assert_equal 2, val
183
- # end
184
-
185
- # def test_it_doesnt_accept_callbacks_in_synchronous_mode
186
- # refute cb.async?
187
-
188
- # assert_raises(ArgumentError) { cb.add(uniq_id, "foo") {} }
189
- # assert_raises(ArgumentError) { cb.set(uniq_id, "foo") {} }
190
- # assert_raises(ArgumentError) { cb.replace(uniq_id, "foo") {} }
191
- # assert_raises(ArgumentError) { cb.get(uniq_id) {} }
192
- # assert_raises(ArgumentError) { cb.touch(uniq_id) {} }
193
- # assert_raises(ArgumentError) { cb.incr(uniq_id) {} }
194
- # assert_raises(ArgumentError) { cb.decr(uniq_id) {} }
195
- # assert_raises(ArgumentError) { cb.delete(uniq_id) {} }
196
- # assert_raises(ArgumentError) { cb.append(uniq_id, "bar") {} }
197
- # assert_raises(ArgumentError) { cb.prepend(uniq_id, "bar") {} }
198
- # assert_raises(ArgumentError) { cb.stats {} }
199
- # end
200
-
201
- # def test_it_disallow_nested_run
202
- # assert_raises(Couchbase::Error::Invalid) do
203
- # cb.run do
204
- # cb.run do
205
- # end
206
- # end
207
- # end
208
- # end
209
-
210
- # def test_it_extends_timeout_in_async_mode_if_needed
211
- # skip
212
- # cb.set(uniq_id, "foo")
213
-
214
- # cb.timeout = 100_000 # 100_000 us
215
- # cb.run do
216
- # cb.get(uniq_id) do |ret|
217
- # assert ret.success?
218
- # assert_equal "foo", ret.value
219
- # end
220
- # sleep(1.5) # 1_500_000 us
221
- # end
222
- # end
223
-
224
- # def test_send_threshold
225
- # skip
226
- # sent = false
227
- # cb.run(:send_threshold => 100) do # 100 bytes
228
- # cb.set(uniq_id, "foo" * 100) {|r| sent = true}
229
- # assert sent
230
- # end
231
- # end
232
-
233
- # def test_asynchronous_connection
234
- # skip
235
- # connection = Couchbase.new(:hostname => @mock.host, :port => @mock.port, :async => true)
236
- # refute cb.connected?, "new asynchronous connection must be disconnected"
237
- # cb.on_connect do |res|
238
- # assert res.success?, "on_connect called with error #{res.error.inspect}"
239
- # assert_same connection, res.bucket
240
- # end
241
- # cb.run {}
242
- # assert cb.connected?, "it should be connected after first run"
243
- # end
244
-
245
- # def test_it_calls_callback_immediately_if_connected_sync
246
- # skip
247
- # assert cb.connected?, "connection wasn't established in sync mode"
248
- # called = false
249
- # cb.on_connect do |res|
250
- # assert res.success?, "on_connect called with error #{res.error.inspect}"
251
- # called = true
252
- # end
253
- # assert called, "the callback hasn't been called on set"
254
- # called = false
255
- # cb.on_connect do |res|
256
- # assert res.success?, "on_connect called with error #{res.error.inspect}"
257
- # called = true
258
- # end
259
- # refute called, "the callback must not be called on subsequent sets"
260
- # end
261
-
262
- # def test_it_calls_callback_immediately_if_connected_async
263
- # skip
264
- # connection = Couchbase.new(:hostname => @mock.host, :port => @mock.port, :async => true)
265
- # refute cb.connected?, "new asynchronous connection must be disconnected"
266
- # called = false
267
- # cb.run {}
268
- # assert cb.connected?, "the connection must be established"
269
- # cb.run do
270
- # cb.on_connect do |res|
271
- # assert res.success?, "on_connect called with error #{res.error.inspect}"
272
- # called = true
273
- # end
274
- # end
275
- # assert called, "the callback hasn't been called on set"
276
- # called = false
277
- # cb.run do
278
- # cb.on_connect do |res|
279
- # assert res.success?, "on_connect called with error #{res.error.inspect}"
280
- # called = true
281
- # end
282
- # end
283
- # refute called, "the callback must not be called on subsequent sets"
284
- # end
285
-
286
- # def test_it_returns_error_if_user_start_work_on_disconnected_instance_outside_on_connect_callback
287
- # skip
288
- # connection = Couchbase.new(:hostname => @mock.host, :port => @mock.port, :async => true)
289
- # refute cb.connected?, "new asynchronous connection must be disconnected"
290
- # error = nil
291
- # cb.on_error do |ex|
292
- # error = ex
293
- # end
294
- # cb.run do |c|
295
- # c.set("foo", "bar")
296
- # end
297
- # assert_instance_of(Couchbase::Error::Connect, error)
298
- # end
299
24
  end
data/test/test_bucket.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestBucket < MiniTest::Test
20
+ class TestBucket < Minitest::Test
21
21
 
22
22
  def test_it_substitute_default_parts_to_url
23
23
  with_configs(:host => 'localhost') do |configs| # pick first free port
data/test/test_cas.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestCas < MiniTest::Test
20
+ class TestCas < Minitest::Test
21
21
 
22
22
  def test_compare_and_swap
23
23
  cb.set(uniq_id, {"bar" => 1})
@@ -29,37 +29,4 @@ class TestCas < MiniTest::Test
29
29
  expected = {"bar" => 1, "baz" => 2}
30
30
  assert_equal expected, val
31
31
  end
32
-
33
- def test_compare_and_swap_async
34
- skip
35
- cb.set(uniq_id, {"bar" => 1})
36
- calls = 0
37
- cb.run do |conn|
38
- conn.cas(uniq_id) do |ret|
39
- calls += 1
40
- case ret.operation
41
- when :get
42
- new_val = ret.value
43
- new_val["baz"] = 2
44
- new_val
45
- when :set
46
- assert ret.success?
47
- else
48
- flunk "Unexpected operation: #{ret.operation.inspect}"
49
- end
50
- end
51
- end
52
- assert_equal 2, calls
53
- val = cb.get(uniq_id)
54
- expected = {"bar" => 1, "baz" => 2}
55
- assert_equal expected, val
56
- end
57
-
58
- def test_flags_replication
59
- skip
60
- cb.set(uniq_id, "bar", :flags => 0x100)
61
- cb.cas(uniq_id) { "baz" }
62
- _, flags, _ = cb.get(uniq_id, :extended => true)
63
- assert_equal 0x100, flags
64
- end
65
32
  end
data/test/test_cluster.rb CHANGED
@@ -16,7 +16,7 @@
16
16
  #
17
17
  require File.join(File.dirname(__FILE__), 'setup')
18
18
 
19
- class TestCluster < MiniTest::Test
19
+ class TestCluster < Minitest::Test
20
20
 
21
21
  def setup
22
22
  @cluster = Couchbase::Cluster.new(username: 'admin', password: 'password')
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestCouchbase < MiniTest::Test
20
+ class TestCouchbase < Minitest::Test
21
21
 
22
22
  def test_that_it_create_instance_of_bucket
23
23
  with_configs do |configs|
@@ -20,7 +20,7 @@
20
20
  # require 'active_support/notifications'
21
21
  # require 'ostruct'
22
22
 
23
- # class TestCouchbaseRailsCacheStore < MiniTest::Test
23
+ # class TestCouchbaseRailsCacheStore < Minitest::Test
24
24
 
25
25
  # def setup
26
26
  # @mock = start_mock
data/test/test_delete.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestDelete < MiniTest::Test
20
+ class TestDelete < Minitest::Test
21
21
 
22
22
  def test_trivial_delete
23
23
  cb.set(uniq_id, "bar")
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestDesignDocs < MiniTest::Test
20
+ class TestDesignDocs < Minitest::Test
21
21
 
22
22
  def test_save_design_doc
23
23
  skip unless $mock.real?
data/test/test_errors.rb CHANGED
@@ -18,7 +18,7 @@
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
  require 'digest/md5'
20
20
 
21
- class TestErrors < MiniTest::Test
21
+ class TestErrors < Minitest::Test
22
22
 
23
23
  def genkey(item)
24
24
  tuple = [item["author"], item["message"]]
data/test/test_fetch.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestFetch < MiniTest::Test
20
+ class TestFetch < Minitest::Test
21
21
 
22
22
  def test_trivial_fetch
23
23
  cb.fetch(uniq_id) do
data/test/test_format.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestFormat < MiniTest::Test
20
+ class TestFormat < Minitest::Test
21
21
 
22
22
  ArbitraryClass = Struct.new(:name, :role)
23
23
  class SkinyClass < Struct.new(:name, :role)
data/test/test_get.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestGet < MiniTest::Test
20
+ class TestGet < Minitest::Test
21
21
 
22
22
  def test_trivial_get
23
23
  cb.set(uniq_id, "bar")
data/test/test_query.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestQuery < MiniTest::Test
20
+ class TestQuery < Minitest::Test
21
21
 
22
-
23
- end
22
+
23
+ end
@@ -0,0 +1,15 @@
1
+ require File.join(File.dirname(__FILE__), 'setup')
2
+
3
+ class TestResult < Minitest::Test
4
+
5
+ def test_result_object_provides_enough_info
6
+ obj = Couchbase::Result.new
7
+ assert obj.respond_to?(:success?)
8
+ assert obj.respond_to?(:error)
9
+ assert obj.respond_to?(:key)
10
+ assert obj.respond_to?(:value)
11
+ assert obj.respond_to?(:node)
12
+ assert obj.respond_to?(:cas)
13
+ end
14
+
15
+ end
data/test/test_stats.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestStats < MiniTest::Test
20
+ class TestStats < Minitest::Test
21
21
 
22
22
  def test_trivial_stats_without_argument
23
23
  stats = cb.stats
data/test/test_store.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestStore < MiniTest::Test
20
+ class TestStore < Minitest::Test
21
21
 
22
22
  def test_trivial_set
23
23
  cas = cb.set(uniq_id, "bar")
data/test/test_touch.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestTouch < MiniTest::Test
20
+ class TestTouch < Minitest::Test
21
21
 
22
22
  def test_trivial_touch
23
23
  cb.set(uniq_id, "bar", :ttl => 1)
data/test/test_unlock.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestUnlock < MiniTest::Test
20
+ class TestUnlock < Minitest::Test
21
21
 
22
22
  def test_trivial_unlock
23
23
  cb.set(uniq_id, "foo")
data/test/test_utils.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestUtils < MiniTest::Test
20
+ class TestUtils < Minitest::Test
21
21
 
22
22
  def test_complex_startkey
23
23
  assert_equal "all_docs?startkey=%5B%22Deadmau5%22%2C%22%22%5D", Couchbase::Utils.build_query("all_docs", :startkey => ["Deadmau5", ""])
data/test/test_version.rb CHANGED
@@ -17,27 +17,12 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestVersion < MiniTest::Test
20
+ class TestVersion < Minitest::Test
21
21
 
22
- def test_sync_version
22
+ def test_version
23
23
  ver = cb.version
24
24
  assert ver.is_a?(Hash)
25
25
  assert_equal 1, ver.size
26
26
  end
27
27
 
28
- def test_async_version
29
- skip
30
- ver = {}
31
- cb.run do |conn|
32
- conn.version do |ret|
33
- assert ret.success?
34
- ver[ret.node] = ret.value
35
- end
36
- end
37
- assert_equal 1, ver.size
38
- ver.each do |node, v|
39
- assert v.is_a?(String)
40
- end
41
- end
42
-
43
28
  end
data/test/test_view.rb CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  require File.join(File.dirname(__FILE__), 'setup')
19
19
 
20
- class TestView < MiniTest::Test
20
+ class TestView < Minitest::Test
21
21
 
22
22
  def setup
23
23
  return unless $mock.real?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couchbase-jruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: java
6
6
  authors:
7
7
  - Mike Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-23 00:00:00.000000000 Z
11
+ date: 2014-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -186,9 +186,9 @@ files:
186
186
  - test/test_format.rb
187
187
  - test/test_get.rb
188
188
  - test/test_query.rb
189
+ - test/test_result.rb
189
190
  - test/test_stats.rb
190
191
  - test/test_store.rb
191
- - test/test_timer.rb
192
192
  - test/test_touch.rb
193
193
  - test/test_unlock.rb
194
194
  - test/test_utils.rb
@@ -240,9 +240,9 @@ test_files:
240
240
  - test/test_format.rb
241
241
  - test/test_get.rb
242
242
  - test/test_query.rb
243
+ - test/test_result.rb
243
244
  - test/test_stats.rb
244
245
  - test/test_store.rb
245
- - test/test_timer.rb
246
246
  - test/test_touch.rb
247
247
  - test/test_unlock.rb
248
248
  - test/test_utils.rb
data/test/test_timer.rb DELETED
@@ -1,34 +0,0 @@
1
- # Author:: Couchbase <info@couchbase.com>
2
- # Copyright:: 2012 Couchbase, Inc.
3
- # License:: Apache License, Version 2.0
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- #
17
-
18
- require File.join(File.dirname(__FILE__), 'setup')
19
-
20
- class TestTimer < MiniTest::Test
21
-
22
- def test_initialization
23
- skip
24
- num = 0
25
- cb.run do
26
- assert Couchbase::Timer.new(connection, 100) { num += 1}
27
- assert cb.create_timer(100) { num += 1}
28
-
29
- assert Couchbase::Timer.new(connection, 100, :periodic => true) {|t| num += 1; t.cancel}
30
- assert cb.create_periodic_timer(100) {|t| num += 1; t.cancel}
31
- end
32
- assert_equal 4, num
33
- end
34
- end