orangeCatDeveloper opened a new pull request, #4250: URL: https://github.com/apache/hertzbeat/pull/4250
## What's changed? Fixes a flaky test: `CommonHttpClientVirtualThreadTest.dispatchConnectionPoolCleanupClosesExpiredAndIdleConnections`. The background cleanup thread calls `closeExpiredConnections()` and then `closeIdleConnections()`. The test awaited a latch only on the **first** call before verifying **both**, so `verify(closeIdleConnections)` could run in the gap between the two calls and fail. Seen failing on CI in an unrelated PR (#4249): https://github.com/apache/hertzbeat/actions/runs/30193599623/job/89771089888 Fix: add a second latch on `closeIdleConnections` and await both before verifying. ## Checklist - [x] I have read the [Contributing Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide) - [x] I have written the necessary doc or comment. - [x] I have added the necessary unit tests and all cases have passed. ## Add or update API - [ ] I have added the necessary [e2e tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have passed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
