Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix test-async-wrap-getasyncid flakyness
The test used to assume that if the client successfully writes data to the server and closes the connection, then the server must have received that data and ran its connection callback wrapped by common.mustCall. However, it is not necessarily the case, and as a result the test was flaky. With this change, the server is closed only once the server's connection callback has been called, which guarantees that the server can accept connections until it actually accepted the single connection that this test requires to accept, making the test not flaky. Fixes: nodejs#13020
- Loading branch information