Sha256: 0f225b092958728c20169fcf90de01f8d1f8bf19f5fa5d3d3120e92290cb46e5

Contents?: true

Size: 910 Bytes

Versions: 10

Compression:

Stored size: 910 Bytes

Contents

#
# testing ruote
#
# Wed Jul  1 23:22:26 JST 2009
#

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


class RtWaitTest < Test::Unit::TestCase
  include FunctionalBase
  include RestartBase

  def test_wait_and_restart

    start_new_engine

    pdef = Ruote.process_definition :name => 'test' do
      sequence do
        echo 'in'
        wait '3d'
        echo 'out.'
      end
    end

    #noisy

    wfid = @engine.launch(pdef)

    wait_for(5)

    assert_equal 1, @engine.processes.size
    assert_equal 1, @engine.storage.get_many('schedules').size

    @engine.shutdown

    # restart...

    start_new_engine

    #noisy

    assert_equal 1, @engine.processes.size
    assert_equal 1, @engine.storage.get_many('schedules').size

    @engine.cancel_process(wfid)

    wait_for(wfid)

    assert_equal 0, @engine.processes.size
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
ruote-maestrodev-2.2.1 test/functional/rt_0_wait.rb
ruote-2.2.0 test/functional/rt_0_wait.rb
ruote-2.1.11 test/functional/rt_0_wait.rb
ruote-2.1.10 test/functional/rt_0_wait.rb
ruote-2.1.9 test/functional/rt_0_wait.rb
ruote-2.1.8 test/functional/rt_0_wait.rb
ruote-2.1.7 test/functional/rt_0_wait.rb
ruote-2.1.6 test/functional/rt_0_wait.rb
ruote-2.1.5 test/functional/rt_0_wait.rb
ruote-2.1.4 test/functional/rt_0_wait.rb