Sha256: 9dbefcca09c23e01b408fb9b97bc89f6220cce23fc3b278aef8386a001cbf723

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

#
# Testing OpenWFEru
#
# John Mettraux at openwfe.org
#

require 'flowtestbase'
require 'pending'
require 'openwfe/def'


class FlowTest55 < Test::Unit::TestCase
    include FlowTestBase
    include PendingJobsMixin

    #def setup
    #end

    #def teardown
    #end


    #
    # Test 0
    #

    class Test0 < OpenWFE::ProcessDefinition
        concurrence :count => 1 do
            sequence do
                participant :ref => "channel_z", :timeout => "1s"
                _print "cancelled?"
            end
            _print "concurrence done"
        end
    end

    def test_0

        #scheduler = @engine.get_scheduler
        #class << scheduler
        #    attr_reader :pending_jobs
        #end

        #log_level_to_debug

        @engine.register_participant :channel_z, OpenWFE::NullParticipant

        #require 'pp'; pp(scheduler.pending_jobs)
        assert_no_jobs_left

        dotest Test0, "concurrence done"

        #require 'pp'; pp(scheduler.pending_jobs)
        assert_no_jobs_left
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.18 test/ft_55_ptimeout.rb