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
The test is addressed in this issue and has inspired a developer fix at this commit.
Test Overview:
Location: Myperf4j-Base/util/concurrent/AtomicIntHashCounterTest.java
Test : testMultiThread4HighRace and testMultiThread4LowRace
The two test are designed to assess the behavior of a multi-threaded scenario with varying levels of contention, and they use random parameters to perform a large number of iterations to test the stability and correctness of the tested code.
Reason of flakiness: ExecutorService newFixedThreadPool(int nThreads) method creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. And it will throw error message IllegalArgumentException if nThreads <= 0.
The author initially set the threadCnt to availableProcessors() - 2 to maybe avoid occupying too many computing resources. However, when the machine we use has less than 2 processors, an error will arise.
Changes:
Use 1 as thread count when when the machine we use has less than 2 processors.
The text was updated successfully, but these errors were encountered:
The test is addressed in this issue and has inspired a developer fix at this commit.
Test Overview:
Location:
Myperf4j-Base/util/concurrent/AtomicIntHashCounterTest.java
Test :
testMultiThread4HighRace
andtestMultiThread4LowRace
The two test are designed to assess the behavior of a multi-threaded scenario with varying levels of contention, and they use random parameters to perform a large number of iterations to test the stability and correctness of the tested code.
Reason of flakiness:
ExecutorService newFixedThreadPool(int nThreads)
method creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. And it will throw error messageIllegalArgumentException
ifnThreads <= 0
.The author initially set the
threadCnt
toavailableProcessors() - 2
to maybe avoid occupying too many computing resources. However, when the machine we use has less than 2 processors, an error will arise.Changes:
The text was updated successfully, but these errors were encountered: