diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java | 16 |
1 files changed, 5 insertions, 11 deletions
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 27ca052c78..fb9bc023fc 100644 --- a/src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java +++ b/src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java @@ -88,7 +88,6 @@ public class MemoizingEvaluatorTest { private EventCollector eventCollector; private EventHandler reporter; protected MemoizingEvaluator.EmittedEventState emittedEventState; - @Nullable NotifyingInMemoryGraph graph = null; // Knobs that control the size / duration of larger tests. private static final int TEST_NODE_COUNT = 100; @@ -98,17 +97,15 @@ public class MemoizingEvaluatorTest { @Before public void initializeTester() { initializeTester(null); + initializeReporter(); } @After public void assertNoTrackedErrors() { TrackingAwaiter.INSTANCE.assertNoErrors(); - if (graph != null) { - graph.assertNoExceptions(); - } } - public void initializeTester(@Nullable TrackingInvalidationReceiver customInvalidationReceiver) { + private void initializeTester(@Nullable TrackingInvalidationReceiver customInvalidationReceiver) { emittedEventState = new MemoizingEvaluator.EmittedEventState(); tester = new MemoizingEvaluatorTester(); if (customInvalidationReceiver != null) { @@ -137,14 +134,13 @@ public class MemoizingEvaluatorTest { return true; } - @Before - public void initializeReporter() { + private void initializeReporter() { eventCollector = new EventCollector(); reporter = eventCollector; tester.resetPlayedEvents(); } - protected static SkyKey toSkyKey(String name) { + private static SkyKey toSkyKey(String name) { return SkyKey.create(NODE_TYPE, name); } @@ -3880,7 +3876,6 @@ public class MemoizingEvaluatorTest { } private void setGraphForTesting(NotifyingInMemoryGraph notifyingInMemoryGraph) { - graph = notifyingInMemoryGraph; InMemoryMemoizingEvaluator memoizingEvaluator = (InMemoryMemoizingEvaluator) tester.evaluator; memoizingEvaluator.setGraphForTesting(notifyingInMemoryGraph); } @@ -4074,13 +4069,12 @@ public class MemoizingEvaluatorTest { /** A graph tester that is specific to the memoizing evaluator, with some convenience methods. */ protected class MemoizingEvaluatorTester extends GraphTester { - private RecordingDifferencer differencer; + private RecordingDifferencer differencer = new RecordingDifferencer(); private MemoizingEvaluator evaluator; private BuildDriver driver; private TrackingInvalidationReceiver invalidationReceiver = new TrackingInvalidationReceiver(); public void initialize() { - this.differencer = new RecordingDifferencer(); this.evaluator = getMemoizingEvaluator(getSkyFunctionMap(), differencer, invalidationReceiver); this.driver = getBuildDriver(evaluator); |