Skip to content

Commit

Permalink
Wait for Sauce Connect to be ready, not just bound to port
Browse files Browse the repository at this point in the history
For Sauce Connect 4.4.12 on macOS 10.10.13, relying on the readyfile to check
startup is not accurate.

Prior to this change, the handler was looking for Sauce Connect to be bound to
the Selenium Relay port, which does not indicate readyness.

resolves #66
  • Loading branch information
DylanLacey authored and jason0x43 committed Oct 10, 2018
1 parent 9ae247e commit c7b67ab
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
36 changes: 18 additions & 18 deletions docs/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -12315,7 +12315,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 513,
"line": 516,
"character": 33
}
],
Expand Down Expand Up @@ -13524,7 +13524,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 569,
"line": 572,
"character": 15
}
],
Expand Down Expand Up @@ -13586,7 +13586,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 575,
"line": 578,
"character": 22
}
],
Expand Down Expand Up @@ -13651,7 +13651,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 578,
"line": 581,
"character": 17
}
],
Expand Down Expand Up @@ -13707,7 +13707,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 581,
"line": 584,
"character": 16
}
],
Expand All @@ -13731,7 +13731,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 584,
"line": 587,
"character": 9
}
],
Expand Down Expand Up @@ -13764,7 +13764,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 593,
"line": 596,
"character": 13
}
],
Expand Down Expand Up @@ -13797,7 +13797,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 596,
"line": 599,
"character": 17
}
],
Expand All @@ -13821,7 +13821,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 587,
"line": 590,
"character": 9
}
],
Expand Down Expand Up @@ -13883,7 +13883,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 590,
"line": 593,
"character": 9
}
],
Expand Down Expand Up @@ -14038,7 +14038,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 599,
"line": 602,
"character": 9
}
],
Expand Down Expand Up @@ -14071,7 +14071,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 602,
"line": 605,
"character": 16
}
],
Expand All @@ -14098,7 +14098,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 605,
"line": 608,
"character": 14
}
],
Expand Down Expand Up @@ -14131,7 +14131,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 572,
"line": 575,
"character": 15
}
],
Expand Down Expand Up @@ -14222,7 +14222,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 608,
"line": 611,
"character": 19
}
],
Expand Down Expand Up @@ -14313,7 +14313,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 611,
"line": 614,
"character": 11
}
],
Expand Down Expand Up @@ -14373,7 +14373,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 567,
"line": 570,
"character": 36
}
],
Expand Down Expand Up @@ -14404,7 +14404,7 @@
"sources": [
{
"fileName": "SauceLabsTunnel.ts",
"line": 614,
"line": 617,
"character": 28
}
],
Expand Down
5 changes: 4 additions & 1 deletion src/SauceLabsTunnel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,10 @@ export default class SauceLabsTunnel extends Tunnel
// update the readyfile when the tunnel is ready. Use the
// 'Selenium listener' message as an alternate startup
// indicator.
if (message.indexOf('Selenium listener started on port ') === 0) {
if (
message.indexOf('Sauce Connect is up, you may start your tests.') ===
0
) {
resolve();
return true;
}
Expand Down

0 comments on commit c7b67ab

Please sign in to comment.