Sha256: 40813bb1198b99c5a8758c71548f22e7a344e9c7a8242513915e06a4d346b513
Contents?: true
Size: 1.51 KB
Versions: 2
Compression:
Stored size: 1.51 KB
Contents
# # Testing OpenWFE # # John Mettraux at openwfe.org # # Tue Jan 2 13:14:37 JST 2007 # #require 'profile' require 'flowtestbase' require 'openwfe/def' include OpenWFE class FlowTest26b < Test::Unit::TestCase include FlowTestBase #def setup #end #def teardown #end # # Test 0 # class TestDefinition0 < ProcessDefinition count end #def xxxx_load_0 def test_load_0 #require 'openwfe/expool/journal' #@engine.application_context[:keep_journals] = true #@engine.init_service("journal", Journal) $count = 0 @engine.register_participant("count") do |workitem| $count += 1 #puts "count is #{$count}" end n = 1000 n.times do |i| @engine.launch(LaunchItem.new(TestDefinition0)) end puts "launched #{n} items" #n.times do |i| # Thread.new do # @engine.launch(LaunchItem.new(TestDefinition0)) # end #end #5.times do # Thread.new do # (n / 5).times do # @engine.launch(LaunchItem.new(TestDefinition0)) # end # end #end #sleep 1 join_until_idle assert_equal $count, n end def join_until_idle () storage = @engine.get_expression_storage while storage.size > 1 sleep 1 puts "storage.size:#{storage.size}" end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
openwferu-0.9.17 | test/bm/ft_26b_load.rb |
ruote-0.9.18 | test/bm/ft_26b_load.rb |