test/rbbt/util/concurrency/test_processes.rb in rbbt-util-5.10.2 vs test/rbbt/util/concurrency/test_processes.rb in rbbt-util-5.11.1

- old
+ new

@@ -42,8 +42,37 @@ end assert_equal times, Dir.glob(File.join(dir, '*')).length end end + + def test_process_abort + assert_raise Aborted do + q = RbbtProcessQueue.new 10 + + res = [] + + q.callback do |v| + res << v + end + + q.init do |i| + sleep 1 while true + end + + times = 500 + t = TSV.setup({"a" => 1}, :type => :single) + + times.times do |i| + q.process i + end + + sleep 2 + q.clean + + q.join + + end + end end