mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 22:10:18 +00:00
Restored burst parallelism in test
- Burst parallelism test restores the shared pool so later concurrency tests see the default size
This commit is contained in:
1 parent
a25d8ec367
commit
af90765a92
1 file changed
+9
-4
@@ -94,10 +94,15 @@ public class PregenPerformanceProfileTest {
|
|||||||
@Test
|
@Test
|
||||||
public void raisingBurstParallelismOnlyGrowsThePool() {
|
public void raisingBurstParallelismOnlyGrowsThePool() {
|
||||||
int before = MultiBurst.burst.parallelism();
|
int before = MultiBurst.burst.parallelism();
|
||||||
assertFalse(MultiBurst.burst.raiseParallelism(before));
|
try {
|
||||||
assertTrue(MultiBurst.burst.raiseParallelism(before + 1));
|
assertFalse(MultiBurst.burst.raiseParallelism(before));
|
||||||
assertEquals(before + 1, MultiBurst.burst.parallelism());
|
assertTrue(MultiBurst.burst.raiseParallelism(before + 1));
|
||||||
assertFalse(MultiBurst.burst.raiseParallelism(before));
|
assertEquals(before + 1, MultiBurst.burst.parallelism());
|
||||||
|
assertFalse(MultiBurst.burst.raiseParallelism(before));
|
||||||
|
} finally {
|
||||||
|
MultiBurst.burst.restoreParallelism();
|
||||||
|
}
|
||||||
|
assertEquals(before, MultiBurst.burst.parallelism());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in new issue
Block a user