Skip to content

Commit 5e3439d

Browse files
committed
[rb] fix #8525 by hardcoding ci runs to only 2 sessions
1 parent 0f274cb commit 5e3439d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

rb/.rubocop.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ RSpec/AnyInstance:
107107
Enabled: false
108108

109109
RSpec/BeforeAfterAll:
110-
Exclude:
111-
- 'spec/unit/selenium/webdriver/socket_poller_spec.rb'
110+
Enabled: false
112111

113112
RSpec/ContextWording:
114113
Enabled: false

rb/lib/selenium/webdriver/common/platform.rb

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def ci
5757
:jenkins
5858
elsif ENV['APPVEYOR']
5959
:appveyor
60+
elsif ENV['GITHUB_ACTIONS']
61+
:github
6062
end
6163
end
6264

rb/spec/integration/selenium/webdriver/driver_spec.rb

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
module Selenium
2323
module WebDriver
2424
describe Driver do
25-
it_behaves_like 'driver that can be started concurrently', exclude: [{browser: %i[safari safari_preview]},
26-
{driver: :remote,
27-
platform: :linux,
28-
reason: 8525}]
25+
it_behaves_like 'driver that can be started concurrently', exclude: {browser: %i[safari safari_preview]}
2926

3027
it 'creates default capabilities' do
3128
reset_driver! do |driver|

rb/spec/integration/selenium/webdriver/spec_support/shared_examples/concurrent_driver.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
# under the License.
1919

2020
shared_examples_for 'driver that can be started concurrently' do |guard|
21+
before(:all) { quit_driver }
22+
2123
after do
2224
drivers.each(&:quit)
2325
threads.select(&:alive?).each(&:kill)
@@ -26,8 +28,9 @@
2628
let(:drivers) { [] }
2729
let(:threads) { [] }
2830

29-
it 'starts 3 drivers sequentially', guard do
30-
3.times do
31+
it 'starts multiple drivers sequentially', guard do
32+
expected_count = WebDriver::Platform.ci ? 2 : 4
33+
expected_count.times do
3134
thread = Thread.new do
3235
drivers << create_driver!
3336
end
@@ -36,7 +39,7 @@
3639
end
3740

3841
expect { threads.each(&:join) }.not_to raise_error
39-
expect(drivers.count).to eq(3)
42+
expect(drivers.count).to eq(expected_count)
4043

4144
# make any wire call
4245
expect { drivers.each(&:title) }.not_to raise_error

0 commit comments

Comments
 (0)