Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a85481

Browse files
committed
bump sleep to 10 + console.log monit summary
1 parent 160cc75 commit 3a85481

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

test/image/compare_pixels_test.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@ var touch = function(fileName) {
2222
fs.closeSync(fs.openSync(fileName, 'w'));
2323
};
2424

25-
// restart nw1 then test
26-
exec('monit restart nw1 && sleep 5', function() {
25+
26+
// restart nw1, wait for it to do that, then test
27+
exec('monit restart nw1 && sleep 10', function() {
28+
var notOkToStart = true;
29+
30+
var monit = spawn('monit', ['summary']);
31+
monit.stdout.on('data', function(data) {
32+
console.log(data.toString().split('\n')[3])
33+
});
34+
2735
if(!userFileName) runAll();
2836
else runSingle(userFileName);
2937
});
@@ -101,12 +109,6 @@ function testMock (fileName, t) {
101109
t.ok(isEqual, imageFileName + ' should be pixel perfect');
102110
}
103111

104-
console.log('before request')
105-
var ps = spawn('ps aux | grep nw');
106-
ps.on('data', function(data) {
107-
console.log(data);
108-
});
109-
110112
request(options)
111113
.pipe(savedImageStream)
112114
.on('close', checkImage);

0 commit comments

Comments
 (0)