Permalink
Browse files

handle multiple seleniums better

  • Loading branch information...
zzo committed Sep 15, 2011
1 parent 1590ad1 commit 1d9d401d30b4b8f66bcf111cca329f15ea7a0a3f
@@ -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');
}
@@ -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);
@@ -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.
@@ -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" : {

0 comments on commit 1d9d401

Please sign in to comment.