Skip to content

Commit

Permalink
deps: use nyc version of egg-bin (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Jun 20, 2017
1 parent f8612f4 commit b838376
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ install:
test_script:
- node --version
- npm --version
- npm run ci
- npm run test

build: off
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@
"url": "https://github.com/node-modules/graceful-process/issues"
},
"author": "fengmk2",
"dependencies": {},
"license": "MIT",
"dependencies": {

},
"devDependencies": {
"autod": "^2.8.0",
"coffee": "^3.3.2",
"coffee": "^4.0.1",
"cross-env": "^5.0.1",
"egg-bin": "^3.4.2",
"egg-ci": "^1.7.0",
"eslint": "^3.19.0",
"eslint-config-egg": "^4.2.0",
"egg-bin": "^4.0.0",
"egg-ci": "^1.8.0",
"eslint": "^4.0.0",
"eslint-config-egg": "^4.2.1",
"mz-modules": "^1.0.0",
"urllib": "^2.22.0"
},
Expand Down
17 changes: 11 additions & 6 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const sleep = require('mz-modules/sleep');
const urllib = require('urllib');

const fixtures = path.join(__dirname, 'fixtures');
const waitStart = process.env.COV ? 30000 : 2000;
const waitStart = process.env.COV ? 5000 : 2000;

describe('test/index.test.js', () => {
describe('cluster', () => {
Expand Down Expand Up @@ -41,9 +41,12 @@ describe('test/index.test.js', () => {
yield sleep(1000);
// make sure all workers exit by itself after SIGTERM event fired
child.proc.kill('SIGTERM');
yield sleep(1000);
yield sleep(2000);
child.notExpect('stderr', /receive disconnect event in cluster fork mode, exitedAfterDisconnect:false/);
child.expect('stdout', /receive signal SIGTERM, exiting with code:0/);
if (process.platform !== 'win32') {
// windows can't handle SIGTERM signal
child.expect('stdout', /receive signal SIGTERM, exiting with code:0/);
}
child.expect('stdout', /exit with code:0/);
child.expect('stdout', /worker \d+ died, code 0, signal null/);
});
Expand All @@ -60,9 +63,11 @@ describe('test/index.test.js', () => {
assert(result.data.toString() === 'hello world\n');
// the worker exit by graceful-process
child.proc.kill('SIGKILL');
yield sleep(1000);
child.expect('stderr', /receive disconnect event on child_process fork mode, exiting with code:110/);
child.expect('stderr', /exit with code:110/);
yield sleep(2000);
if (process.platform !== 'win32') {
child.expect('stderr', /receive disconnect event on child_process fork mode, exiting with code:110/);
child.expect('stderr', /exit with code:110/);
}
});
});

Expand Down

0 comments on commit b838376

Please sign in to comment.