test/ruby_procdef_test.rb in openwferu-0.9.16 vs test/ruby_procdef_test.rb in openwferu-0.9.17
- old
+ new
@@ -48,25 +48,23 @@
fei0 = @engine.launch Test0
sleep 0.100
fei1 = @engine.launch Test0
sleep 0.200
- stack0 = @engine.get_process_stack fei0.wfid
- #puts stack0
- stack1 = @engine.get_process_stack fei1.wfid
- #puts stack1
+ stack0 = @engine.process_stack fei0.wfid
+ stack1 = @engine.process_stack fei1.wfid
- assert_equal stack0.size, 3
- assert_equal stack1.size, 3
+ assert_equal 3, stack0.size
+ assert_equal 3, stack1.size
- assert_equal count_files(fei0.wfid), 4
- assert_equal count_files(fei1.wfid), 4
+ assert_equal 4, count_files(fei0.wfid)
+ assert_equal 4, count_files(fei1.wfid)
@engine.cancel_process(fei0.wfid)
@engine.cancel_process(fei1.wfid)
- sleep 0.100
+ sleep 0.350
end
TEST1 = """
class Test1 < OpenWFE::ProcessDefinition
@@ -77,30 +75,33 @@
"""
def test_1
fei0 = launch TEST1
- sleep 0.200
+ sleep 0.100
fei1 = launch TEST1
sleep 0.200
- assert_equal ProcessDefinition.extract_class(TEST1), Test1
+ #assert_equal ProcessDefinition.extract_class(TEST1), Test1
+ assert_equal(
+ OpenWFE::ProcessDefinition::Test1,
+ ProcessDefinition.extract_class(TEST1))
- stack0 = @engine.get_process_stack fei0.wfid
+ stack0 = @engine.process_stack fei0.wfid
#puts stack0
- stack1 = @engine.get_process_stack fei1.wfid
+ stack1 = @engine.process_stack fei1.wfid
#puts stack1
- assert_equal stack0.size, 3
- assert_equal stack1.size, 3
+ assert_equal 3, stack0.size
+ assert_equal 3, stack1.size
- assert_equal count_files(fei0.wfid), 4
- assert_equal count_files(fei1.wfid), 4
+ assert_equal 4, count_files(fei0.wfid)
+ assert_equal 4, count_files(fei1.wfid)
@engine.cancel_process(fei0.wfid)
@engine.cancel_process(fei1.wfid)
- sleep 0.100
+ sleep 0.350
end
protected
def launch (test_string)