Sha256: 8ec4ab911f9436f749bdaa1510c358bc0973d7c4cf6ad22a27451973b1ceac65

Contents?: true

Size: 1.11 KB

Versions: 4

Compression:

Stored size: 1.11 KB

Contents

#
# testing ruote
#
# Sun Jun 14 13:33:17 JST 2009
#

require File.join(File.dirname(__FILE__), 'base')


class EftForgetTest < Test::Unit::TestCase
  include FunctionalBase

  def test_basic

    pdef = Ruote.process_definition do
      sequence do
        forget do
          alpha
        end
        alpha
      end
    end

    @engine.register_participant :alpha do
      @tracer << "alpha\n"
    end

    #noisy

    wfid = @engine.launch(pdef)

    wait_for(:alpha)
    wait_for(:alpha)
    wait_for(wfid)
    wait_for(wfid)

    assert_equal "alpha\nalpha", @tracer.to_s

    #logger.log.each { |e| puts e['action'] }
    assert_equal 1, logger.log.select { |e| e['action'] == 'ceased' }.size
    assert_equal 1, logger.log.select { |e| e['action'] == 'terminated' }.size
  end

  #def test_variables
  #  pdef = Ruote.process_definition do
  #    set :var => 'a', :value => 0
  #    concurrence do
  #      set :var => 'a', :value => 1
  #      forget do
  #        echo '0_${v:a}'
  #      end
  #      echo '1_${v:a}'
  #    end
  #    echo '2_${v:a}'
  #  end
  #  noisy
  #  assert_trace pdef, %w[ 1_1 0_0 2_1 ]
  #end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruote-2.1.7 test/functional/eft_7_forget.rb
ruote-2.1.6 test/functional/eft_7_forget.rb
ruote-2.1.5 test/functional/eft_7_forget.rb
ruote-2.1.4 test/functional/eft_7_forget.rb