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:
Brian Neumann-Fopiano committed 2026-10-22 04:49:45 -04:00
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