Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add debug-mode agent port check and set #113

Closed
wants to merge 1 commit into from
Closed

add debug-mode agent port check and set #113

wants to merge 1 commit into from

Conversation

hellmonky
Copy link

@hellmonky hellmonky commented Oct 30, 2018

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

test for pr:

alibaba@alibaba-ThinkPad-X1-Carbon-2nd:/home/alibaba/egg-bin$ npm test

[email protected] test /home/alibaba/egg-bin
npm run lint -- --fix && npm run test-local

[email protected] lint /home/alibaba/egg-bin
eslint . "--fix"

[email protected] test-local /home/alibaba/egg-bin
node bin/egg-bin.js test -t 3600000

test/egg-bin.test.js
global options
✓ should show version (298ms)
✓ should show help (315ms)
✓ should show help when command not exists (329ms)

test/lib/cmd/autod.test.js
✓ should autod modify (642ms)
[ERROR] Missing dependencies: ["urllib"]

⚠️ Error: /home/alibaba/egg-bin/node_modules/autod/bin/autod.js --check exit with code 1
⚠️ Command Error, enable DEBUG=common-bin for detail
✓ should autod check fail (462ms)
✓ should autod check pass (434ms)

test/lib/cmd/cov.test.js
1) should success
✓ should exit when not test files (324ms)
2) should hotfixSpawnWrap success on mock windows
✓ should success with COV_EXCLUDES (1028ms)
✓ should success with -x to ignore one dirs (1022ms)
✓ should success with -x to ignore multi dirs (1020ms)
✓ should fail when test fail (921ms)
✓ should fail when test fail with power-assert (1000ms)
✓ should warn when require intelli-espower-loader (995ms)
✓ should run cov when no test files (325ms)
✓ should set EGG_BIN_PREREQUIRE (2319ms)
✓ should passthrough nyc args (969ms)

test/lib/cmd/debug.test.js
✓ should startCluster success (3411ms)
✓ should startCluster with port (3397ms)
✓ should debug with $NODE_DEBUG_OPTION (3416ms)
auto detect available port
✓ should auto detect available port (3407ms)
real egg
3) should proxy
4) should proxy with port
✓ should not print devtools at vscode (1065ms)
✓ should not print devtools at webstorm (1088ms)

test/lib/cmd/dev.test.js
✓ should startCluster success (3406ms)
✓ should dev start with custom NODE_ENV (3391ms)
✓ should startCluster with --harmony success (3390ms)
✓ should startCluster with --port (3373ms)
✓ should startCluster with --sticky (3376ms)
✓ should startCluster with -p (3370ms)
✓ should startCluster with --cluster=2 (3391ms)
✓ should startCluster with --baseDir=root (3403ms)
✓ should startCluster with custom yadan framework (390ms)
✓ should startCluster with execArgv --inspect (3411ms)
✓ should support --require (3414ms)
auto detect available port
✓ should auto detect available port (3408ms)

test/lib/cmd/pkgfiles.test.js
✓ should update pkg.files (468ms)
✓ should check pkg.files (434ms)

test/lib/cmd/test.test.js
✓ should success (633ms)
✓ should ignore node_modules and fixtures (629ms)
✓ should only test files specified by TESTS (564ms)
✓ should only test files specified by TESTS with multi pattern (563ms)
✓ should only test files specified by TESTS argv (564ms)
✓ should exit when not test files (320ms)
✓ should use process.env.TEST_REPORTER (627ms)
✓ should use process.env.TEST_TIMEOUT (634ms)
✓ should fail when test fail with power-assert (634ms)
✓ should warn when require intelli-espower-loader (633ms)
✓ should auto require test/.setup.js (1621ms)

mocha-test
✓ should work

1 passing (16ms)

✓ should force exit (633ms)
simplify mocha error stack
  ✓ should clean assert error stack (629ms)
  ✓ should should show full stack trace (614ms)
  ✓ should clean co error stack (567ms)
  ✓ should clean callback error stack (579ms)
changed

No changed test files
✓ should return undefined if no test file changed
✓ should return file changed
No changed test files
✓ should filter not test file

test/mocha-bin.test.js

mocha-test
✓ should work

1 passing (6ms)

✓ should test with mocha (176ms)

test/my-egg-bin.test.js
✓ should my-egg-bin test success (630ms)
✓ should my-egg-bin nsp success (316ms)
✓ should my-egg-bin dev success (380ms)
✓ should show help message (316ms)
✓ should show version 2.3.4 (293ms)
5) should custom context
✓ should add no-timeouts at test when debug enabled (372ms)

test/ts.test.js
6) should support ts
✓ should support ts test (2103ms)
real application
7) should start app
8) should test app
9) should cov app
error stacks
10) should correct error stack line number in starting app
✓ should correct error stack line number in testing app (2010ms)
✓ should correct error stack line number in covering app (822ms)
egg.typescript = true
11) should start app
12) should fail start app with --no-ts
13) should start app with relative path
14) should test app

Copy link
Member

@atian25 atian25 left a comment

Choose a reason for hiding this comment

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

你做了啥?为啥整个文件都是 diff 的?
需要补充单测

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants