Sha256: 075fe8468303ed12814129b44d2a5cea0156653311f478809ff1cb958fd04644

Contents?: true

Size: 620 Bytes

Versions: 8

Compression:

Stored size: 620 Bytes

Contents

require_relative '../test-util'

class TestCommandListener < Pione::Agent::TupleSpaceClient
  define_state :test

  define_state_transition :initialized => :test
  define_state_transition :test => :test

  def transit_to_test
    sleep 0.1
  end
end

describe 'Pione::Agent::CommandListener' do
  before do
    create_remote_tuple_space_server
  end

  after do
    DRb.stop_service
  end

  it 'should terminate' do
    agent = TestCommandListener.start(tuple_space_server)
    agent.wait_till(:test)
    write(Tuple[:command].new("terminate"))
    agent.wait_till(:terminated)
    agent.should.be.terminated
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pione-0.2.2 test/agent/spec_command-listener.rb
pione-0.2.1 test/agent/spec_command-listener.rb
pione-0.2.0 test/agent/spec_command-listener.rb
pione-0.1.4 test/agent/spec_command-listener.rb
pione-0.1.3 test/agent/spec_command-listener.rb
pione-0.1.2 test/agent/spec_command-listener.rb
pione-0.1.1 test/agent/spec_command-listener.rb
pione-0.1.0 test/agent/spec_command-listener.rb