test/rbbt/util/concurrency/test_processes.rb in rbbt-util-5.8.10 vs test/rbbt/util/concurrency/test_processes.rb in rbbt-util-5.9.0

- old
+ new

@@ -5,11 +5,11 @@ require 'rbbt/util/concurrency/processes' class TestConcurrencyProcess < Test::Unit::TestCase def test_process - q = RbbtProcessQueue.new 1 + q = RbbtProcessQueue.new 10 res = [] q.callback do |v| res << v @@ -20,21 +20,18 @@ end times = 500 t = TSV.setup({"a" => 1}, :type => :single) - Misc.benchmark do times.times do |i| q.process i end q.join q.clean - end assert_equal times, res.length assert_equal [0, 2, 4], res.sort[0..2] - end def test_each times = 5000 elems = (0..times-1).to_a