Caideyipi opened a new pull request, #18364:
URL: https://github.com/apache/iotdb/pull/18364
## Description
Fix a timing race in `L1PriorityQueueTest.testPollBlocked` observed in an
unrelated Windows unit-test job.
The test slept for a fixed 100 ms before checking the worker thread state.
On a loaded runner, the worker could still be `RUNNABLE`, even though
`L1PriorityQueue.poll()` blocks correctly once it reaches the empty queue.
Use Awaitility with a bounded timeout for both the `WAITING` and
`TERMINATED` states. This matches the existing synchronization pattern in
`L2PriorityQueueTest` and `MultilevelPriorityQueueTest`.
## Tests
- `mvn '-Ddevelocity.off=true' -pl iotdb-core/datanode -am
'-Dtest=L1PriorityQueueTest' '-Dsurefire.failIfNoSpecifiedTests=false' test`
- Tests run: 5, failures: 0, errors: 0
<hr>
This PR has:
- [x] been self-reviewed.
- [x] replaced fixed sleeps with bounded condition waits.
- [x] reused the established pattern from sibling queue tests.
- [x] passed the targeted DataNode unit test locally.
--
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]