Skip to content

Commit

Permalink
Revert 74eea92 (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmgrant authored Apr 20, 2020
1 parent befef86 commit c23ba6a
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/launcher/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ export function SaucelabsLauncher(args,
// Array of connected drivers. This is useful for quitting all connected drivers on kill.
let connectedDrivers: WebDriver[] = [];

// number of pending cancellations for heartbeat functionality
let pendingCancellations = 0;

// Setup Browser name that will be printed out by Karma.
this.name = browserName + ' on SauceLabs';

Expand Down Expand Up @@ -105,13 +102,7 @@ export function SaucelabsLauncher(args,
browserMap.set(this.id, {sessionId, username, accessKey, proxy: sauceApiProxy});

await driver.get(pageUrl);
heartbeat();
} catch (e) {
// determine if there are still pending cancellations based on the heartbeat
if (pendingCancellations > 0) {
pendingCancellations--;
return;
}
log.error(e);

// Notify karma about the failure.
Expand All @@ -120,11 +111,6 @@ export function SaucelabsLauncher(args,
});

this.on('kill', async (doneFn: () => void) => {
// If there is still pending heartbeats, clear the timeout
if (pendingHeartBeat) {
clearTimeout(pendingHeartBeat);
}

try {
await Promise.all(connectedDrivers.map(driver => driver.quit()));
} catch (e) {
Expand Down

0 comments on commit c23ba6a

Please sign in to comment.