test/test_queue.rb in proco-0.0.1 vs test/test_queue.rb in proco-0.0.2

- old
+ new

@@ -5,11 +5,11 @@ require 'proco' require 'lps' class TestQueue < MiniTest::Unit::TestCase def test_single_queue - q = Proco::Queue::SingleQueue.new 100 + q = Proco::Queue::SingleQueue.new 100, nil f = q.push 1 assert_instance_of Proco::Future, f q.push 2 f2, i = q.take @@ -19,11 +19,11 @@ f3, i = q.take assert_equal 2, i end def test_batch_queue - q = Proco::Queue::BatchQueue.new 100, 10 + q = Proco::Queue::BatchQueue.new 100, 10, nil futures = 10.times.map { |i| q.push i } assert_equal 1, futures.uniq.length future = futures.first @@ -41,11 +41,11 @@ f = q.push :next assert future2 != f end def test_multi_queue - q = Proco::Queue::MultiQueue.new 100 + q = Proco::Queue::MultiQueue.new 100, nil f1 = q.push 1 f2 = q.push 2 f3 = q.push 3 assert_equal f1, f2 assert_equal f2, f3 @@ -61,10 +61,10 @@ assert_equal f5, f6 assert_equal [4], items end def test_multi_queue_complex - queue = Proco::Queue::MultiQueue.new(200) + queue = Proco::Queue::MultiQueue.new(200, nil) futures = [] num_batches = 0 num_items = 0 t1 = Thread.new {