Skip to content

Commit

Permalink
fix(test): Eliminate Race Between LivenessScope Closing and GC (deeph…
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauernfeind authored Oct 12, 2024
1 parent 3066b7f commit 16c55ac
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//
package io.deephaven.engine.table.impl;

import io.deephaven.engine.liveness.LivenessScope;
import io.deephaven.engine.table.impl.AsOfJoinMatchFactory.AsOfJoinResult;
import io.deephaven.base.clock.Clock;
import io.deephaven.base.testing.BaseArrayTestCase;
Expand Down Expand Up @@ -661,31 +662,31 @@ public void testAjRandomLeftIncrementalRightStatic() {
for (int leftSize = 10; leftSize <= maxLeftSize; leftSize *= leftFactor) {
for (int rightSize = 10; rightSize <= maxRightSize; rightSize *= rightFactor) {
System.out.println("Seed=" + seed + ", leftSize=" + leftSize + ", rightSize=" + rightSize);
try (final SafeCloseable ignored = LivenessScopeStack.open()) {
try (final SafeCloseable ignored = LivenessScopeStack.open(new LivenessScope(true), true)) {
testAjRandomIncremental(base.leftStep, seed, leftSize, rightSize, true, false, false, false);
}
try (final SafeCloseable ignored = LivenessScopeStack.open()) {
try (final SafeCloseable ignored = LivenessScopeStack.open(new LivenessScope(true), true)) {
testAjRandomIncremental(base.leftStep, seed, leftSize, rightSize, true, false, true, false);
}
try (final SafeCloseable ignored = LivenessScopeStack.open()) {
try (final SafeCloseable ignored = LivenessScopeStack.open(new LivenessScope(true), true)) {
testAjRandomIncremental(base.leftStep, seed, leftSize, rightSize, true, false, false, true);
}
try (final SafeCloseable ignored = LivenessScopeStack.open()) {
try (final SafeCloseable ignored = LivenessScopeStack.open(new LivenessScope(true), true)) {
testAjRandomIncremental(base.leftStep, seed, leftSize, rightSize, true, false, true, true);
}
try (final SafeCloseable ignored = LivenessScopeStack.open()) {
try (final SafeCloseable ignored = LivenessScopeStack.open(new LivenessScope(true), true)) {
testAjRandomIncremental(base.leftStepShift, seed, leftSize, rightSize, true, false, false,
false);
}
try (final SafeCloseable ignored = LivenessScopeStack.open()) {
try (final SafeCloseable ignored = LivenessScopeStack.open(new LivenessScope(true), true)) {
testAjRandomIncremental(base.leftStepShift, seed, leftSize, rightSize, true, false, true,
false);
}
try (final SafeCloseable ignored = LivenessScopeStack.open()) {
try (final SafeCloseable ignored = LivenessScopeStack.open(new LivenessScope(true), true)) {
testAjRandomIncremental(base.leftStepShift, seed, leftSize, rightSize, true, false, false,
true);
}
try (final SafeCloseable ignored = LivenessScopeStack.open()) {
try (final SafeCloseable ignored = LivenessScopeStack.open(new LivenessScope(true), true)) {
testAjRandomIncremental(base.leftStepShift, seed, leftSize, rightSize, true, false, true, true);
}
}
Expand Down

0 comments on commit 16c55ac

Please sign in to comment.