# # Testing OpenWFE # # John Mettraux at openwfe.org # # Sun Oct 29 16:18:25 JST 2006 # #require "rubygems" #require "thread" #require "fastthread" require 'test/unit' require 'openwfe/utils' require 'openwfe/expool/expressionpool' # # testing otime and the scheduler (its cron aspect) # class WfidTest < Test::Unit::TestCase #def setup #end #def teardown #end def test_wfid_0 expool = OpenWFE::ExpressionPool.new("expool", nil) class << expool public :new_workflow_instance_id end n = 21 map = {} n.times do |i| Thread.new do #begin wfid = expool.new_workflow_instance_id() #rescue Exception => e # OpenWFE::die(e.to_s) #end #puts wfid OpenWFE::die("\nduplicate workflow_instance_id found !!!") \ if map[wfid] map[wfid] = true end end sleep(2) #puts assert true end end