forked from eclipse-platform/eclipse.platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Sleep with While Loop in WorkerPoolTest
Summary: Replaced a 5-second sleep used to wait for worker threads to become idle in the WorkerPoolTest with a while loop. This change includes a timeout of 5 seconds to check when there are fewer than 50 workers, making the test more responsive and reliable. Changes: - Removed the `Thread.sleep(5 * 1000L);` line that was used to wait until worker threads become idle. - Added a while loop with a 5-second timeout to actively check for the condition of fewer than 50 active worker threads. - Updated test annotations. Benefits: This change makes the test more robust by actively checking the condition instead of relying on a fixed sleep time. It also aligns with the modern testing approach and ensures the test does not hang indefinitely.
- Loading branch information
1 parent
668133e
commit ff56cb6
Showing
1 changed file
with
72 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters