test/ft_60_ecancel.rb in openwferu-0.9.16 vs test/ft_60_ecancel.rb in openwferu-0.9.17
- old
+ new
@@ -12,14 +12,15 @@
class FlowTest60 < Test::Unit::TestCase
include FlowTestBase
- #def teardown
+ #def setup
#end
- #def setup
+ #def teardown
+ # $OWFE_LOG.level = Logger::INFO # done in FlowTestBase !
#end
#
# TEST 0
@@ -39,47 +40,88 @@
#$OWFE_LOG.level = Logger::DEBUG
fei = @engine.launch TestDefinition0
- sleep 0.300
+ sleep 0.350
#puts
#puts @engine.get_process_stack fei.wfid
#puts
fei.expression_id = "0.0.1"
fei.expression_name = "sequence"
@engine.cancel_expression fei
- sleep 0.300
+ sleep 0.350
assert_equal "a\nb.0\nc", @tracer.to_s
- assert_equal 0, @engine.get_process_stack(fei.wfid).size
-
- #$OWFE_LOG.level = Logger::INFO
+ assert_equal 0, @engine.process_stack(fei.wfid).size
+ assert_equal 1, @engine.get_expression_storage.size
end
def test_1
#$OWFE_LOG.level = Logger::DEBUG
fei = @engine.launch TestDefinition0
- sleep 0.300
+ sleep 0.350
fei.expression_id = "0.0.1.2"
fei.expression_name = "print"
@engine.cancel_expression fei
@engine.wait_for(fei.wfid)
assert_equal "a\nb.0\nc", @tracer.to_s
- assert_equal 0, @engine.get_process_stack(fei.wfid).size
+ assert_equal 0, @engine.process_stack(fei.wfid).size
+ assert_equal 1, @engine.get_expression_storage.size
+ end
- #$OWFE_LOG.level = Logger::INFO
+ def test_2
+
+ #$OWFE_LOG.level = Logger::DEBUG
+
+ fei = @engine.launch TestDefinition0
+
+ sleep 0.350
+
+ fei.expression_id = "0"
+ fei.expression_name = "process-definition"
+ @engine.cancel_expression fei
+
+ sleep 0.350
+ #puts @engine.get_error_journal.get_error_log(fei.wfid).to_s
+
+ assert_equal "a\nb.0", @tracer.to_s
+
+ assert_equal 0, @engine.process_stack(fei.wfid).size
+ assert_equal 1, @engine.get_expression_storage.size
+ end
+
+ def test_3
+
+ #$OWFE_LOG.level = Logger::DEBUG
+
+ fei = @engine.launch TestDefinition0
+
+ sleep 0.350
+
+ fei.expression_id = "0.0"
+ fei.expression_name = "sequence"
+ @engine.cancel_expression fei
+
+ @engine.wait_for(fei.wfid)
+ #sleep 0.350
+ #puts @engine.get_error_journal.get_error_log(fei.wfid).to_s
+
+ assert_equal "a\nb.0", @tracer.to_s
+
+ assert_equal 0, @engine.process_stack(fei.wfid).size
+ assert_equal 1, @engine.get_expression_storage.size
end
end