Skip to content

Commit 6cdb48f

Browse files
committed
Add retries on the examples
1 parent 2bb93a1 commit 6cdb48f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

spec/octocatalog-diff/integration/examples_spec.rb

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@
4040

4141
context 'executing' do
4242
before(:all) do
43-
@stdout, @stderr, @exitcode = Open3.capture3(@script)
43+
# Add retries just in case something goes wrong in CI
44+
3.times do
45+
@stdout, @stderr, @exitcode = Open3.capture3(@script)
46+
break if @exitcode.exitstatus.zero?
47+
end
4448
end
4549

4650
it 'should run without error' do
@@ -74,7 +78,11 @@
7478

7579
context 'executing' do
7680
before(:all) do
77-
@stdout, @stderr, @exitcode = Open3.capture3(@script)
81+
# Add retries just in case something goes wrong in CI
82+
3.times do
83+
@stdout, @stderr, @exitcode = Open3.capture3(@script)
84+
break if @exitcode.exitstatus.zero?
85+
end
7886
end
7987

8088
it 'should run without error' do
@@ -106,7 +114,11 @@
106114

107115
context 'executing' do
108116
before(:all) do
109-
@stdout, @stderr, @exitcode = Open3.capture3(@script)
117+
# Add retries just in case something goes wrong in CI
118+
3.times do
119+
@stdout, @stderr, @exitcode = Open3.capture3(@script)
120+
break if @exitcode.exitstatus.zero?
121+
end
110122
end
111123

112124
it 'should run without error' do

0 commit comments

Comments
 (0)