Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #179 from crumbjp/add_wait_setup_user_server
Browse files Browse the repository at this point in the history
Add "wait" field to .zuul.yml to wait for starting user_server
  • Loading branch information
Vincent Voyer committed Mar 23, 2015
2 parents c06dc2e + e093664 commit 931987a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/user-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ module.exports = function(server, callback) {

var cmd;
var cwd;
var wait = 0;
if (server !== null && server.cmd) {
// expect the following format in .zuul.yml
// server:
// cmd: ./test/support/server.js
// cwd: ./anotherapp
cmd = server.cmd;
cwd = server.cwd;
wait = server.wait;
}
else {
// expect the following format in .zuul.yml
Expand Down Expand Up @@ -59,7 +61,9 @@ module.exports = function(server, callback) {

process.on('exit', exit);

return callback({ port: port, process: ps });
return setTimeout(function(){
callback({ port: port, process: ps });
}, wait);
});
};

Expand Down

0 comments on commit 931987a

Please sign in to comment.