test/ft_67_schedlaunch.rb in openwferu-0.9.15 vs test/ft_67_schedlaunch.rb in openwferu-0.9.16
- old
+ new
@@ -30,73 +30,86 @@
def test_0
#log_level_to_debug
- @engine.launch(Test0, :in => "2s")
+ @engine.launch Test0, :in => "2s"
sleep 0.200
- assert_equal @tracer.to_s, ""
+ assert_equal(
+ 1,
+ @engine.get_scheduler.find_jobs("scheduled-launch").size)
+ assert_trace ""
+
sleep 2.500
- assert_equal @tracer.to_s, "hell0"
+ assert_trace "hell0"
end
#
# TEST 1
- #def xxxx_1
def test_1
#log_level_to_debug
t = Time.now
- @engine.launch(Test0, :at => (t + 2).to_s)
+ @engine.launch Test0, :at => (t + 2).to_s
sleep 0.200
- assert_equal @tracer.to_s, ""
+ assert_equal(
+ 1,
+ @engine.get_scheduler.find_jobs("scheduled-launch").size)
+ assert_trace ""
+
sleep 2.500
- assert_equal @tracer.to_s, "hell0"
+ assert_trace "hell0"
end
#
# TEST 2
- #def xxxx_2
def test_2
- log_level_to_debug
+ #log_level_to_debug
- @engine.launch(Test0, :cron => "* * * * *")
+ @engine.launch Test0, :cron => "* * * * *"
- assert_equal @tracer.to_s, ""
+ assert_trace ""
sleep 130
- assert_equal @tracer.to_s, "hell0\nhell0"
+ assert_trace "hell0\nhell0"
+
+ assert_equal(
+ 1,
+ @engine.get_scheduler.find_jobs("scheduled-launch").size)
end
#
# TEST 3
- #def xxxx_3
def test_3
log_level_to_debug
- @engine.launch(Test0, :every => "2s")
+ @engine.launch Test0, :every => "2s"
- assert_equal @tracer.to_s, ""
+ assert_trace ""
sleep 5
- assert_equal @tracer.to_s, "hell0\nhell0"
+ assert_trace "hell0\nhell0"
+
+ assert_equal(
+ 1,
+ @engine.get_scheduler.find_jobs("scheduled-launch").size)
end
end