aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-09-09 21:44:07 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-09-11 08:46:08 +0000
commit5411129bae8e3f7ec6975ecbdf5c1cc04b50ec65 (patch)
tree9cc38bbabbd234e8c465c9a03e6b688dc3537153 /src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
parent162b4410d7b82021e8ffa2197a076d9ba6332ca7 (diff)
Delay cleaning of in-flight nodes until the following build. This allows us to interrupt evaluation in constant time.
Some ParallelEvaluator tests that implicitly relied on cleaning happening before the next evaluation were moved into MemoizingEvaluatorTest as a result. -- MOS_MIGRATED_REVID=102696653
Diffstat (limited to 'src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java b/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
index 809277e5e6..4c8cc1c8a8 100644
--- a/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
+++ b/src/test/java/com/google/devtools/build/skyframe/EagerInvalidatorTest.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import com.google.common.base.Preconditions;
+import com.google.common.base.Receivers;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -48,6 +49,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import java.lang.ref.WeakReference;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
@@ -134,11 +136,19 @@ public class EagerInvalidatorTest {
protected <T extends SkyValue> EvaluationResult<T> eval(boolean keepGoing, SkyKey... keys)
throws InterruptedException {
Reporter reporter = new Reporter();
- ParallelEvaluator evaluator = new ParallelEvaluator(graph, graphVersion,
- ImmutableMap.of(GraphTester.NODE_TYPE, tester.createDelegatingFunction()),
- reporter, new MemoizingEvaluator.EmittedEventState(),
- InMemoryMemoizingEvaluator.DEFAULT_STORED_EVENT_FILTER, keepGoing, 200, null,
- new DirtyKeyTrackerImpl());
+ ParallelEvaluator evaluator =
+ new ParallelEvaluator(
+ graph,
+ graphVersion,
+ ImmutableMap.of(GraphTester.NODE_TYPE, tester.createDelegatingFunction()),
+ reporter,
+ new MemoizingEvaluator.EmittedEventState(),
+ InMemoryMemoizingEvaluator.DEFAULT_STORED_EVENT_FILTER,
+ keepGoing,
+ 200,
+ null,
+ new DirtyKeyTrackerImpl(),
+ Receivers.<Collection<SkyKey>>ignore());
graphVersion = graphVersion.next();
return evaluator.eval(ImmutableList.copyOf(keys));
}