Sha256: f6499853654affdd7c0e25b228a77535cdeb5e24a4ec62ca7d3dfad599b0f186

Contents?: true

Size: 893 Bytes

Versions: 10

Compression:

Stored size: 893 Bytes

Contents

# syntactic sugar, and separate ivar.  daemons aren't interactive
When /^I run "([^"]*)" in the background$/ do |cmd|
  run_background(unescape(cmd))
end

Then /^the (output|logfiles) should contain the following lines \(with interpolated \$PID\):$/ do |output_logfiles, partial_output|
  interpolate_background_pid(partial_output).split("\n").each do |line|
    output_or_log(output_logfiles).should include(line)
  end
end

When /^I send "([^"]*)" the "([^"]*)" signal$/ do |cmd, signal|
  send_signal(cmd, signal)
end

Then /^the "([^"]*)" process should finish$/ do |cmd|
  # doesn't actually stop... just polls for exit
  processes[cmd].stop
end

Before("@slow_exit") do
  @aruba_timeout_seconds = 10
end

After do
  kill_all_processes!
  # now kill the daemon!
  begin
    Process.kill(9, @pid_from_pidfile) if @pid_from_pidfile
  rescue Errno::ESRCH
  end
  #`pkill -9 resque-pool`
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
resque-pool-0.5.0 features/step_definitions/daemon_steps.rb
resque-pool-0.5.0.rc1 features/step_definitions/daemon_steps.rb
resque-pool-0.4.0 features/step_definitions/daemon_steps.rb
resque-pool-0.4.0.rc3 features/step_definitions/daemon_steps.rb
resque-pool-diet-0.3.1 features/step_definitions/daemon_steps.rb
resque-pool-vinted-0.4.0.rc1 features/step_definitions/daemon_steps.rb
resque-pool-0.4.0.rc2 features/step_definitions/daemon_steps.rb
resque-pool-0.4.0.rc1 features/step_definitions/daemon_steps.rb
resque-pool-0.3.0 features/step_definitions/daemon_steps.rb
resque-pool-0.3.0.beta.2 features/step_definitions/daemon_steps.rb