[DRE-commits] [ruby-aruba] 30/74: Fixed timing values

Hideki Yamane henrich at moszumanska.debian.org
Sat Nov 28 01:16:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository ruby-aruba.

commit 37426f8b2303a3f9c7682bbdc790a4fb914a5052
Author: Dennis Günnewig <dg1 at ratiodata.de>
Date:   Tue Nov 24 12:45:03 2015 +0100

    Fixed timing values
---
 features/api/command/send_signal.feature   |  4 ++--
 features/api/command/stop.feature          | 27 ---------------------------
 features/steps/command/send_signal.feature |  6 +++---
 features/steps/command/stop.feature        | 22 +++++++++++++---------
 4 files changed, 18 insertions(+), 41 deletions(-)

diff --git a/features/api/command/send_signal.feature b/features/api/command/send_signal.feature
index 04b9697..9e9026a 100644
--- a/features/api/command/send_signal.feature
+++ b/features/api/command/send_signal.feature
@@ -25,7 +25,7 @@ Feature: Send running command a signal
     """ruby
     require 'spec_helper'
 
-    RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 5, :startup_wait_time => 4 do
+    RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 1, :startup_wait_time => 5 do
       before(:each) { run('cli') }
       before(:each) { last_command_started.send_signal 'HUP' }
       it { expect(last_command_started).to have_output /Exit/ }
@@ -44,7 +44,7 @@ Feature: Send running command a signal
     """ruby
     require 'spec_helper'
 
-    RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 5, :startup_wait_time => 4 do
+    RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 1, :startup_wait_time => 5 do
       before(:each) { run('cli') }
       it { expect { last_command_started.send_signal 'HUP' }.to raise_error Aruba::CommandAlreadyStoppedError, /Command "cli" with PID/ }
     end
diff --git a/features/api/command/stop.feature b/features/api/command/stop.feature
index 0fca855..58b8ccf 100644
--- a/features/api/command/stop.feature
+++ b/features/api/command/stop.feature
@@ -8,33 +8,6 @@ Feature: Stop command
   Background:
     Given I use a fixture named "cli-app"
 
-  Scenario: Stop all commands
-    Given an executable named "bin/cli" with:
-    """
-    #!/bin/bash
-    function term {
-      exit 0
-    }
-
-    trap term TERM
-
-    while [ true ]; do sleep 1; done
-    """
-    And a file named "spec/sanitize_spec.rb" with:
-    """
-    require 'spec_helper'
-
-    RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 3, :startup_wait_time => 2 do
-      before(:each) { 3.times { run('cli') } }
-
-      before(:each) { stop_all_commands }
-
-      it { expect(all_commands).to all be_successfully_executed }
-    end
-    """
-    When I run `rspec`
-    Then the specs should all pass
-
   Scenario: Stop successful command with configured signal
     Given an executable named "bin/cli" with:
     """bash
diff --git a/features/steps/command/send_signal.feature b/features/steps/command/send_signal.feature
index 7ead024..ffa012a 100644
--- a/features/steps/command/send_signal.feature
+++ b/features/steps/command/send_signal.feature
@@ -27,7 +27,7 @@ Feature: Send a signal to command
     Feature: Run it
       Scenario: Run command
         Given the default aruba exit timeout is 5 seconds
-        And I wait 2 seconds for a command to start up
+        And I wait 5 seconds for a command to start up
         When I run `cli` in background
         And I send the signal "HUP" to the command started last
         Then the exit status should be 0
@@ -56,7 +56,7 @@ Feature: Send a signal to command
     Feature: Run it
       Scenario: Run command
         Given the default aruba exit timeout is 5 seconds
-        And I wait 2 seconds for a command to start up
+        And I wait 5 seconds for a command to start up
         When I run `cli` in background
         And I send the signal "HUP" to the command "cli"
         Then the exit status should be 0
@@ -92,7 +92,7 @@ Feature: Send a signal to command
     Feature: Run it
       Scenario: Run command
         Given the default aruba exit timeout is 5 seconds
-        And I wait 2 seconds for a command to start up
+        And I wait 5 seconds for a command to start up
         When I run `cli` in background
         And I run `kill -HUP <pid-last-command-started>`
         Then the output should contain:
diff --git a/features/steps/command/stop.feature b/features/steps/command/stop.feature
index 0478ead..234eabe 100644
--- a/features/steps/command/stop.feature
+++ b/features/steps/command/stop.feature
@@ -39,12 +39,13 @@ Feature: Stop commands
     """
     Feature: Run it
       Background:
-        Given the default aruba exit timeout is 5 second
+        Given the default aruba exit timeout is 1 second
 
       Scenario: Run command
-        Given I run `cli1` in background
+        Given I wait 5 seconds for a command to start up
+        When I run `cli1` in background
         And I run `cli2` in background
-        When I terminate the command started last
+        And I terminate the command started last
         Then the exit status should be 0
         And the output should contain:
         \"\"\"
@@ -92,9 +93,10 @@ Feature: Stop commands
         Given the default aruba exit timeout is 5 seconds
 
       Scenario: Run command
-        Given I run `cli1` in background
+        Given I wait 5 seconds for a command to start up
+        When I run `cli1` in background
         And I run `cli2` in background
-        When I stop the command started last
+        And I stop the command started last
         Then the exit status should be 0
         And the output should contain:
         \"\"\"
@@ -140,9 +142,10 @@ Feature: Stop commands
         Given the default aruba exit timeout is 5 seconds
 
       Scenario: Run command
-        Given I run `cli1` in background
-        And I run `cli2` in background
-        When I terminate the command "cli1"
+        Given I wait 5 seconds for a command to start up
+        When I run `cli1` in background
+        When I run `cli2` in background
+        And I terminate the command "cli1"
         Then the exit status should be 0
         And the output should contain:
         \"\"\"
@@ -190,7 +193,8 @@ Feature: Stop commands
         Given the default aruba exit timeout is 5 seconds
 
       Scenario: Run command
-        Given I run `cli1` in background
+        Given I wait 5 seconds for a command to start up
+        When I run `cli1` in background
         And I run `cli2` in background
         When I stop the command "cli1"
         Then the exit status should be 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-aruba.git



More information about the Pkg-ruby-extras-commits mailing list