This commit is contained in:
Brian Neumann-Fopiano committed 2026-10-02 17:13:30 -04:00
1 parent a765e76aa3
commit 12e8bb5a09
6 files changed
+11 -7

No files matched your search

@@ -351,7 +351,9 @@ public class AsyncPregenServerSaveOwnershipTest {
}
}, 10, 1_000_000, 0, 0, 127, 0);
fixture.set("retention", retention);
try (SchedulingContext context = new SchedulingContext(fixture)) {
try (SchedulingContext context = new SchedulingContext(fixture);
MockedStatic<MantleHeapPressure> pressure = mockStatic(MantleHeapPressure.class)) {
pressure.when(MantleHeapPressure::overHighWater).thenReturn(false);
for (int region = 0; region < 128; region++) {
long key = (long) region << 32;
retention.retainAround(region << 5, 0);
@@ -376,7 +378,9 @@ public class AsyncPregenServerSaveOwnershipTest {
Fixture fixture = new Fixture();
AtomicInteger pendingChunks = new AtomicInteger(2);
fixture.pendingRegions.put(0L, pendingChunks);
try (SchedulingContext context = new SchedulingContext(fixture)) {
try (SchedulingContext context = new SchedulingContext(fixture);
MockedStatic<MantleHeapPressure> pressure = mockStatic(MantleHeapPressure.class)) {
pressure.when(MantleHeapPressure::overHighWater).thenReturn(false);
CompletableFuture<?> eviction = (CompletableFuture<?>) invoke(fixture.method, "evictRegion", 0L);
eviction.get(5L, TimeUnit.SECONDS);
assertSame(pendingChunks, fixture.pendingRegions.get(0L));