fix(ci): set management.server.port=0 in test profile to fix 25-min test timeout #594
Reference in New Issue
Block a user
Delete Branch "fix/issue-593-management-port-zero"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
management.server.port: 0toapplication-test.yamlso each Spring context binds to a random free port during testsRoot cause
PR #576 added
management.server.port: 8081(fixed port) toapplication.yaml. Four test classes use@DirtiesContext(AFTER_EACH_TEST_METHOD)which causes ~22 Spring context restarts. Each restart binds port 8081, then releases it — but the OS keeps it inTIME_WAITfor ~45–60 s. The next context startup blocks until the OS releases the port. 22 cycles × ~45 s = ~17 min of overhead. All 1601 tests pass but the surefire 10-min timeout fires before the suite finishes.Setting port to
0gives each context a fresh random port — no conflicts, noTIME_WAITwait, suite returns to ~5 min.Closes #593.
Test plan