Fixed BrowserStack timeout error handling.
This commit is contained in:
@@ -120,7 +120,7 @@ RSpec.describe 'AutoRunEngine Test', :run_on_browserstack => true do
|
||||
begin
|
||||
@driver.quit
|
||||
rescue => exception
|
||||
if exception.include?('Failed to open TCP connection')
|
||||
if exception.class == NoMethodError && exception.message.include?('Failed to open TCP connection')
|
||||
print_info "Encountered possible false negative timeout error checking exception."
|
||||
expect(exception).to include('hub-cloud.browserstack.com:80')
|
||||
else
|
||||
|
||||
@@ -117,7 +117,7 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
|
||||
begin
|
||||
@driver.quit
|
||||
rescue => exception
|
||||
if exception.include?('Failed to open TCP connection')
|
||||
if exception.class == NoMethodError && exception.message.include?('Failed to open TCP connection')
|
||||
print_info "Encountered possible false negative timeout error checking exception."
|
||||
expect(exception).to include('hub-cloud.browserstack.com:80')
|
||||
else
|
||||
|
||||
@@ -106,7 +106,7 @@ RSpec.describe 'Browser hooking with Websockets', :run_on_browserstack => true d
|
||||
begin
|
||||
@driver.quit
|
||||
rescue => exception
|
||||
if exception.include?('Failed to open TCP connection')
|
||||
if exception.class == NoMethodError && exception.message.include?('Failed to open TCP connection')
|
||||
print_info "Encountered possible false negative timeout error checking exception."
|
||||
expect(exception).to include('hub-cloud.browserstack.com:80')
|
||||
else
|
||||
|
||||
@@ -124,7 +124,7 @@ RSpec.describe 'BeEF Debug Command Modules:', :run_on_browserstack => true do
|
||||
begin
|
||||
@driver.quit
|
||||
rescue => exception
|
||||
if exception.include?('Failed to open TCP connection')
|
||||
if exception.class == NoMethodError && exception.message.include?('Failed to open TCP connection')
|
||||
print_info "Encountered possible false negative timeout error checking exception."
|
||||
expect(exception).to include('hub-cloud.browserstack.com:80')
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user