test/restart_cron_test.rb in openwferu-0.9.6 vs test/restart_cron_test.rb in openwferu-0.9.7

- old
+ new

@@ -15,11 +15,11 @@ require 'rutest_utils' include OpenWFE -class RestartTest < Test::Unit::TestCase +class RestartCronTest < Test::Unit::TestCase #def setup # @engine = $WORKFLOW_ENGINE_CLASS.new() #end @@ -28,11 +28,11 @@ class RestartDefinition0 < ProcessDefinition def make process_definition :name => "rs0", :revision => "0" do cron :tab => "* * * * *", :name => "//cron" do - participant :cron_event + participant :cron_event_restart end end end end @@ -41,15 +41,15 @@ engine = FilePersistedEngine.new count = 0 participant = lambda do - #puts "______________________ :cron_event" + #puts "______________________ :cron_event_restart" count = count + 1 end - engine.register_participant(:cron_event, &participant) + engine.register_participant(:cron_event_restart, &participant) engine.launch(RestartDefinition0) sleep(60) @@ -58,10 +58,14 @@ #puts "___restarting to new engine" old_engine = engine engine = FilePersistedEngine.new - engine.register_participant(:cron_event, &participant) + engine.register_participant(:cron_event_restart, &participant) + + engine.reload + # + # very important sleep(60) engine.stop()