Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tasks/baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ var cmd = containerCommands.getRunCmd(
);

console.log(msg);
common.execCmd(containerCommands.ping, function() {
common.execCmd(cmd);
});
common.execCmd(cmd);
4 changes: 1 addition & 3 deletions tasks/test_export.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ var cmd = containerCommands.getRunCmd(
);

console.log(msg);
common.execCmd(containerCommands.ping, function() {
common.execCmd(cmd);
});
common.execCmd(cmd);
4 changes: 1 addition & 3 deletions tasks/test_image.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ var cmd = containerCommands.getRunCmd(
);

console.log(msg);
common.execCmd(containerCommands.ping, function() {
common.execCmd(cmd);
});
common.execCmd(cmd);
16 changes: 11 additions & 5 deletions tasks/util/container_commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ containerCommands.setup = [
containerCommands.cpIndex,
containerCommands.injectEnv,
containerCommands.restart,
'sleep 1',
containerCommands.ping,
'sleep 5'
].join(' && ');

containerCommands.dockerRun = [
Expand All @@ -34,12 +35,17 @@ containerCommands.dockerRun = [

containerCommands.getRunCmd = function(isCI, commands) {
var _commands = Array.isArray(commands) ? commands.slice() : [commands];
var cmd;

if(isCI) return getRunCI(_commands);
if(isCI) {
_commands = [containerCommands.ping].concat(_commands);
cmd = getRunCI(_commands);
} else {
_commands = [containerCommands.setup].concat(_commands);
cmd = getRunLocal(_commands);
Copy link
Collaborator

Choose a reason for hiding this comment

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

so if I'm reading this right, locally we'll be restarting, pinging, and waiting 5 seconds at the beginning of every command? Seems a little heavy, but if it avoids random hangs (which waste a lot more than 5 secs when they happen) then it's OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it's a little heavy, but at least now npm run test-image always worksTM.

I should probably give #1972 another go at some point in the next few weeks. We really don't need to be running pixel comparison tests with a server, a CLI runner should do just fine.

}

// add setup commands locally
_commands = [containerCommands.setup].concat(_commands);
return getRunLocal(_commands);
return cmd;
};

function getRunLocal(commands) {
Expand Down