You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there are a number of tests that will use Thread.sleep() to pause execution to wait for task completion.
During the TCK port I centralized this activity to a single point for future enhancement:
Instead of sleeping the thread, we should instead use the already available waitForXXX() methods that exist in the test utility.
Or for cases when we are going down an error path and need to wait for something to expire, we should perform polling to either fail, or succeed as quickly as possible.
There are instances where polling is already performed and the poll interval and duration are standardized to a constant here:
KyleAure
changed the title
TCK enhancement pool for task completion instead of sleeping
TCK enhancement poll for task completion instead of sleeping
Jul 31, 2023
Currently, there are a number of tests that will use
Thread.sleep()
to pause execution to wait for task completion.During the TCK port I centralized this activity to a single point for future enhancement:
concurrency/tck/src/main/java/ee/jakarta/tck/concurrent/framework/TestUtil.java
Lines 167 to 180 in cc64ec4
Instead of sleeping the thread, we should instead use the already available
waitForXXX()
methods that exist in the test utility.Or for cases when we are going down an error path and need to wait for something to expire, we should perform polling to either fail, or succeed as quickly as possible.
There are instances where polling is already performed and the poll interval and duration are standardized to a constant here:
concurrency/tck/src/main/java/ee/jakarta/tck/concurrent/framework/TestConstants.java
Lines 33 to 38 in cc64ec4
Consider introducing system properties to allow for implementations to specify their own interval and duration.
The text was updated successfully, but these errors were encountered: