Skip to content

Commit

Permalink
handle multiple seleniums better
Browse files Browse the repository at this point in the history
  • Loading branch information
zzo committed Sep 15, 2011
1 parent 1590ad1 commit 1d9d401
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/nodejute/jute/actions/getTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports = {
// No tests for me - end if we're a Selenium browser
if (req.session.selenium) {
// Selenium job all done!!
hub.emit('seleniumTestsFinished');
hub.emit(req.session.uuid + 'finished');
} else {
hub.emit('testsDone');
}
Expand Down
3 changes: 2 additions & 1 deletion backend/nodejute/jute/actions/runTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ module.exports = {
// Start up for a Selenium browser & Listen for results
var totalError = '';
hub.on('action:seleniumDone', function(err, selID) {
seleniumIDs.pop();
seleniumIDs.pop(); // a selenium browser finished - we don't really care which one
// as we're just waiting for all to finish
var done = !seleniumIDs.length;
if (done) hub.removeListener('action:seleniumDone', arguments.callee);

Expand Down
2 changes: 1 addition & 1 deletion backend/nodejute/jute/actions/startSelenium.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = {
hub.emit('action:seleniumDone', err, selID);
}
};
cb = hub.once('seleniumTestsFinished', cb);
cb = hub.once(selID + 'finished', cb);

browser.
chain.
Expand Down
2 changes: 1 addition & 1 deletion backend/nodejute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jute",
"description": "Javascript Unit Test Environment",
"keywords": ["selenium", "test", "testing", "unit", "tests"],
"version": "0.0.52",
"version": "0.0.53",
"author": "Mark Ethan Trostler <mark@zzo.com>",
"preferGlobal": true,
"bin" : {
Expand Down

0 comments on commit 1d9d401

Please sign in to comment.