Skip to content

Commit

Permalink
Use larger values to safely demonstrate timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Nov 7, 2020
1 parent 2a5c156 commit 1d0fd3e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions features/02_configure_aruba/basics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: Usage of configuration
Given a file named "spec/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.1
config.exit_timeout = 0.5
end
"""
And a file named "spec/usage_configuration_spec.rb" with:
Expand All @@ -38,7 +38,7 @@ Feature: Usage of configuration
end
context 'when slow command' do
before(:each) { run_command('aruba-test-cli 0.2') }
before(:each) { run_command('aruba-test-cli 1') }
it { expect(last_command_started).not_to be_successfully_executed }
end
end
Expand All @@ -55,7 +55,7 @@ Feature: Usage of configuration
Given a file named "spec/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.1
config.exit_timeout = 0.5
end
"""
And a file named "spec/support/hooks.rb" with:
Expand All @@ -64,7 +64,7 @@ Feature: Usage of configuration
config.before :each do |example|
next unless example.metadata.key? :slow_command
aruba.config.exit_timeout = 0.3
aruba.config.exit_timeout = 1.5
end
end
"""
Expand All @@ -79,12 +79,12 @@ Feature: Usage of configuration
end
context 'when slow command and this is known by the developer', :slow_command => true do
before(:each) { run_command('aruba-test-cli 0.2') }
before(:each) { run_command('aruba-test-cli 1') }
it { expect(last_command_started).to be_successfully_executed }
end
context 'when slow command, but this might be a failure' do
before(:each) { run_command('aruba-test-cli 0.2') }
before(:each) { run_command('aruba-test-cli 1') }
it { expect(last_command_started).not_to be_successfully_executed }
end
end
Expand All @@ -96,7 +96,7 @@ Feature: Usage of configuration
Given a file named "features/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.1
config.exit_timeout = 0.5
end
"""
And a file named "features/run.feature" with:
Expand All @@ -107,7 +107,7 @@ Feature: Usage of configuration
Then the exit status should be 0
Scenario: Slow command
When I run `aruba-test-cli 0.2`
When I run `aruba-test-cli 1.0`
Then the exit status should be 128
"""
When I run `cucumber`
Expand All @@ -122,13 +122,13 @@ Feature: Usage of configuration
Given a file named "features/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.1
config.exit_timeout = 0.5
end
"""
And a file named "features/support/hooks.rb" with:
"""ruby
Before '@slow-command' do
aruba.config.exit_timeout = 0.3
aruba.config.exit_timeout = 1.5
end
"""
And a file named "features/usage_configuration.feature" with:
Expand All @@ -140,11 +140,11 @@ Feature: Usage of configuration
@slow-command
Scenario: Slow command known by the developer
When I run `aruba-test-cli 0.2`
When I run `aruba-test-cli 1.0`
Then the exit status should be 0
Scenario: Slow command which might be a failure
When I run `aruba-test-cli 0.2`
When I run `aruba-test-cli 1.0`
Then the exit status should be 128
"""
When I run `cucumber`
Expand Down

0 comments on commit 1d0fd3e

Please sign in to comment.