Sha256: 5f7b1cc2918759d6586912a9c6346889fc92050e02ae4cb16655fc8b18a3602d

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Mon Oct  9 22:19:44 JST 2006
#

require 'rubygems'

require 'openwfe/def'
require 'openwfe/participants/storeparticipants'

require 'flowtestbase'


class FlowTest34 < Test::Unit::TestCase
    include FlowTestBase

    #def teardown
    #end

    #def setup
    #end

    #
    # TEST 0

    class TestCancelWfid0 < OpenWFE::ProcessDefinition
        #
        # so tiny a definition...
        #
        store_participant
    end

    def test_cancelwfid_0

        sp = @engine.register_participant(
            "store_participant", OpenWFE::HashParticipant)

        fei = launch TestCancelWfid0

        sleep 0.300

        @engine.cancel_process(fei.wfid)

        sleep 0.350

        l = @engine.list_processes

        assert_equal 0, l.size

        assert_equal 0, sp.size
            # check that participant got cancelled as well
    end

    def test_cancelwfid_1

        #log_level_to_debug

        sp = @engine.register_participant(
            "store_participant", OpenWFE::YamlParticipant)

        fei = launch TestCancelWfid0

        sleep 0.350

        @engine.cancel_process(fei.wfid)

        sleep 0.350

        assert_equal 0, @engine.get_process_stack(fei.wfid).size

        assert_equal 0, sp.size
            # check that participant got cancelled as well
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.18 test/ft_34_cancelwfid.rb