Skip to content

Commit 2845fd4

Browse files
committed
Reduce stressTestMultiplier to 25 (from 30) in stress test mode;
Introduce stressTestMultiplierSqrt that is a square root of stressTestMultiplier
1 parent 6129c94 commit 2845fd4

File tree

1 file changed

+3
-1
lines changed
  • core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental

1 file changed

+3
-1
lines changed

core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/TestBase.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ public actual open class TestBase actual constructor() {
4747
*/
4848
public actual val isStressTest = System.getProperty("stressTest") != null
4949

50+
public val stressTestMultiplierSqrt = if (isStressTest) 5 else 1
51+
5052
/**
5153
* Multiply various constants in stress tests by this factor, so that they run longer during nightly stress test.
5254
*/
53-
public actual val stressTestMultiplier = if (isStressTest) 30 else 1
55+
public actual val stressTestMultiplier = stressTestMultiplierSqrt * stressTestMultiplierSqrt
5456

5557
private var actionIndex = AtomicInteger()
5658
private var finished = AtomicBoolean()

0 commit comments

Comments
 (0)