Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test keep-alive implementation, refs #49 #61

Closed
wants to merge 3 commits into from
Closed

unit test keep-alive implementation, refs #49 #61

wants to merge 3 commits into from

Conversation

bitpshr
Copy link
Contributor

@bitpshr bitpshr commented Jul 3, 2013

Intern runs unit tests on the remote Selenium server by navigating to the client runner HTML page. No Selenium commands are issued after this initial call to remote.get() below, so Sauce Labs will assume failure if unit tests take longer than the specified "idle-timeout" Sauce capabilities parameter.

This PR takes care of issuing a keep-alive heartbeat to ensure that Sauce Labs knows the session is still active.

For more info on Sauce timeouts, see https://saucelabs.com/docs/additional-config.

// issue a keep-alive heartbeat to ensure that Sauce Labs knows the session is still active.For more info
// on Sauce timeouts, see https://saucelabs.com/docs/additional-config.
heartbeat = setInterval(function () {
remote._wd.url();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don’t access privates of other objects. create a new method on PromisedWebDriver like setHeartbeatInterval that does this, and call it here.

@bitpshr
Copy link
Contributor Author

bitpshr commented Jul 8, 2013

refs #49

@@ -49,11 +49,20 @@ define([
topic.subscribe('/client/end', function (sessionId) {
if (sessionId === remote.sessionId) {
clearHandles();
// Passing a delay of 0 clears the current interval and won't create a new one
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you are going to add a comment, please use it to explain why not what. (I personally do not think a comment is actually needed here.)

@csnover
Copy link
Member

csnover commented Jul 26, 2013

Reimplemented based on this in 02ff6d8

@csnover csnover closed this Jul 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new or improved feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants