Use rspec-retry in flaky brew tests.
We have a few tests that are intermittently flaky. Let's try this to see if we can get them a bit more reliable.
This commit is contained in:
parent
e904983275
commit
c57ab279ba
@ -5,6 +5,7 @@ require_relative "../constants"
|
||||
gem "parallel_tests"
|
||||
gem "rspec"
|
||||
gem "rspec-its", require: false
|
||||
gem "rspec-retry", require: false
|
||||
gem "rspec-wait", require: false
|
||||
gem "rubocop", HOMEBREW_RUBOCOP_VERSION
|
||||
|
||||
|
@ -31,6 +31,8 @@ GEM
|
||||
rspec-mocks (3.6.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.6.0)
|
||||
rspec-retry (0.5.6)
|
||||
rspec-core (> 3.3, < 3.8)
|
||||
rspec-support (3.6.0)
|
||||
rspec-wait (0.0.9)
|
||||
rspec (>= 3, < 4)
|
||||
@ -58,9 +60,10 @@ DEPENDENCIES
|
||||
parallel_tests
|
||||
rspec
|
||||
rspec-its
|
||||
rspec-retry
|
||||
rspec-wait
|
||||
rubocop (= 0.52.1)
|
||||
simplecov
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.0
|
||||
1.16.1
|
||||
|
@ -25,7 +25,7 @@ describe "brew search", :integration_test do
|
||||
.and be_a_success
|
||||
end
|
||||
|
||||
it "falls back to a GitHub tap search when no formula is found", :needs_network do
|
||||
it "falls back to a GitHub tap search when no formula is found", :needs_network, retry: 3 do
|
||||
expect { brew "search", "caskroom/cask/firefox" }
|
||||
.to output(/firefox/).to_stdout
|
||||
.and output(/Searching/).to_stderr
|
||||
|
@ -1,4 +1,4 @@
|
||||
describe "brew services", :integration_test, :needs_macos, :needs_network do
|
||||
describe "brew services", :integration_test, :needs_macos, :needs_network, retry: 3 do
|
||||
it "allows controlling services" do
|
||||
setup_remote_tap "homebrew/services"
|
||||
|
||||
|
@ -6,7 +6,7 @@ describe "brew pull", :integration_test do
|
||||
.and be_a_failure
|
||||
end
|
||||
|
||||
it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network do
|
||||
it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network, retry: 3 do
|
||||
CoreTap.instance.path.cd do
|
||||
system "git", "init"
|
||||
system "git", "checkout", "-b", "new-branch"
|
||||
|
@ -2,6 +2,7 @@ require "find"
|
||||
require "pathname"
|
||||
require "rspec/its"
|
||||
require "rspec/wait"
|
||||
require "rspec/retry"
|
||||
require "rubocop"
|
||||
require "rubocop/rspec/support"
|
||||
require "set"
|
||||
|
Loading…
x
Reference in New Issue
Block a user