mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 14:00:26 +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
|
||||
public void raisingBurstParallelismOnlyGrowsThePool() {
|
||||
int before = MultiBurst.burst.parallelism();
|
||||
assertFalse(MultiBurst.burst.raiseParallelism(before));
|
||||
assertTrue(MultiBurst.burst.raiseParallelism(before + 1));
|
||||
assertEquals(before + 1, MultiBurst.burst.parallelism());
|
||||
assertFalse(MultiBurst.burst.raiseParallelism(before));
|
||||
try {
|
||||
assertFalse(MultiBurst.burst.raiseParallelism(before));
|
||||
assertTrue(MultiBurst.burst.raiseParallelism(before + 1));
|
||||
assertEquals(before + 1, MultiBurst.burst.parallelism());
|
||||
assertFalse(MultiBurst.burst.raiseParallelism(before));
|
||||
} finally {
|
||||
MultiBurst.burst.restoreParallelism();
|
||||
}
|
||||
assertEquals(before, MultiBurst.burst.parallelism());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user