Sha256: 116a3d760cc18b76e5ba0ba8d64ed14b47a8924ab50704a801d0d20b3e565c80

Contents?: true

Size: 1.25 KB

Versions: 3

Compression:

Stored size: 1.25 KB

Contents

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

require 'openwfe/def'
require 'openwfe/worklist/storeparticipant'

require 'flowtestbase'


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

    #def teardown
    #end

    #def setup
    #end

    #
    # TEST 0

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

    def test_cancelwfid_0

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

        fei = @engine.launch(TestCancelWfid0)

        sleep 0.500

        @engine.cancel_process(fei.wfid)

        l = @engine.list_processes()

        assert_equal l.size, 0

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

    def test_cancelwfid_1

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

        fei = @engine.launch(TestCancelWfid0)

        sleep 0.500

        @engine.cancel_process(fei.wfid)

        #l = @engine.list_processes()
        #assert_equal l.size, 0

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
openwferu-0.9.10 test/ft_34_cancelwfid.rb
openwferu-0.9.10.653 test/ft_34_cancelwfid.rb
openwferu-0.9.11 test/ft_34_cancelwfid.rb