add debug-mode agent port check and set #113
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
npm test
passesAffected core subsystem(s)
Description of change
test for pr:
alibaba@alibaba-ThinkPad-X1-Carbon-2nd:/home/alibaba/egg-bin$ npm test
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"]
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)
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)
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