diff --git a/src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java b/src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java index 607effa2a50e4c..6536c2b9d128cb 100644 --- a/src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java +++ b/src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java @@ -35,6 +35,7 @@ import com.google.common.collect.Sets; import com.google.common.eventbus.EventBus; import com.google.common.testing.GcFinalization; +import com.google.common.truth.IterableSubject; import com.google.common.util.concurrent.Uninterruptibles; import com.google.devtools.build.lib.events.DelegatingEventHandler; import com.google.devtools.build.lib.events.Event; @@ -78,7 +79,7 @@ public class MemoizingEvaluatorTest { protected MemoizingEvaluatorTester tester; - private EventCollector eventCollector; + protected EventCollector eventCollector; private ExtendedEventHandler reporter; protected MemoizingEvaluator.EmittedEventState emittedEventState; @@ -148,7 +149,7 @@ protected boolean preciseEvaluationStatusStored() { return true; } - private void initializeReporter() { + protected void initializeReporter() { eventCollector = new EventCollector(); reporter = new Reporter(new EventBus(), eventCollector); tester.resetPlayedEvents(); @@ -1367,9 +1368,12 @@ protected void parentOfCycleAndErrorInternal( assertThatErrorInfo(errorInfo).hasCycleInfoThat().hasSize(1); } // But the parent itself shouldn't have a direct dep on the special error transience node. - assertThatEvaluationResult(evalResult) - .hasDirectDepsInGraphThat(top) - .doesNotContain(ErrorTransienceValue.KEY); + verifyParentDepsForParentOfCycleAndError( + assertThatEvaluationResult(evalResult).hasDirectDepsInGraphThat(top)); + } + + protected void verifyParentDepsForParentOfCycleAndError(IterableSubject parentDeps) { + parentDeps.doesNotContain(ErrorTransienceValue.KEY); } @Test