test/functional/ft_32_history.rb in ruote-2.1.1 vs test/functional/ft_32_history.rb in ruote-2.1.2
- old
+ new
@@ -3,12 +3,15 @@
# testing ruote
#
# Sun Oct 4 00:14:27 JST 2009
#
-
-require 'yajl' rescue require 'json'
+begin
+ require 'yajl'
+rescue LoadError
+ require 'json'
+end
Rufus::Json.detect_backend rescue nil
require File.join(File.dirname(__FILE__), 'base')
require 'ruote/log/fs_history'
@@ -33,11 +36,11 @@
#noisy
wfid0 = assert_trace(pdef, "done.")
wfid1 = assert_trace(pdef, "done.\ndone.")
- sleep 0.010
+ sleep 0.100
lines = File.readlines(Dir['work/log/*'].first)
assert_equal 17, lines.size
#lines.each { |l| puts l }
@@ -77,11 +80,11 @@
#noisy
wfid0 = assert_trace(pdef, "done.")
- sleep 0.010
+ sleep 0.100
h = @engine.context.history.by_process(wfid0)
#h.each { |r| p r }
assert_equal 11, h.size
@@ -102,11 +105,11 @@
#noisy
wfid = @engine.launch(pdef)
wait_for(wfid)
- sleep 0.010
+ sleep 0.100
h = @engine.context.history.by_process(wfid)
#h.each { |r| p r }
assert_equal 2, h.size
@@ -132,10 +135,10 @@
fei = @engine.process(wfid).errors.first.fei
@engine.cancel_expression(fei)
wait_for(wfid)
- sleep 0.010
+ sleep 0.100
h = @engine.context.history.by_process(wfid)
#h.each { |r| p r }
assert_equal 5, h.size