aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/skyframe
diff options
context:
space:
mode:
authorGravatar Nathan Harmata <nharmata@google.com>2016-08-02 18:13:28 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-08-03 07:57:26 +0000
commitc55fe15fc36ad01b93f4efe85ff85911d041d5d7 (patch)
treeae8ec9fc39f54ca08703ee82fbc85e3a5acd519a /src/test/java/com/google/devtools/build/skyframe
parent70fbf690e571037370044f7d1e316b0bf9172e1c (diff)
Delete NodeEntryField since it's now superfluous in the presence of the new QueryableGraph.Reason which conveys more information. Add a few more Reason enum values to make this refactor benign.
-- MOS_MIGRATED_REVID=129118462
Diffstat (limited to 'src/test/java/com/google/devtools/build/skyframe')
-rw-r--r--src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java8
-rw-r--r--src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java2
-rw-r--r--src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java3
-rw-r--r--src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java8
-rw-r--r--src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java2
5 files changed, 9 insertions, 14 deletions
diff --git a/src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java b/src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java
index fe7c76fc91..e27cab4790 100644
--- a/src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java
+++ b/src/test/java/com/google/devtools/build/skyframe/DeterministicHelper.java
@@ -16,7 +16,6 @@ package com.google.devtools.build.skyframe;
import com.google.common.collect.Iterables;
import java.util.Collection;
import java.util.Comparator;
-import java.util.EnumSet;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
@@ -116,12 +115,11 @@ public class DeterministicHelper extends NotifyingHelper {
}
@Override
- public Map<SkyKey, NodeEntry> getBatchWithFieldHints(
+ public Map<SkyKey, NodeEntry> getBatch(
@Nullable SkyKey requestor,
Reason reason,
- Iterable<SkyKey> keys,
- EnumSet<NodeEntryField> fields) {
- return makeDeterministic(super.getBatchWithFieldHints(requestor, reason, keys, fields));
+ Iterable<SkyKey> keys) {
+ return makeDeterministic(super.getBatch(requestor, reason, keys));
}
}
diff --git a/src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java b/src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java
index 0cbc91ce32..fda230ead1 100644
--- a/src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java
+++ b/src/test/java/com/google/devtools/build/skyframe/DeterministicInMemoryGraph.java
@@ -28,7 +28,7 @@ class DeterministicInMemoryGraph extends DeterministicHelper.DeterministicProces
@Override
public Map<SkyKey, NodeEntry> getBatchForInvalidation(Iterable<SkyKey> keys) {
- return getBatchWithFieldHints(null, Reason.INVALIDATION, keys, NodeEntryField.ALL_FIELDS);
+ return getBatch(null, Reason.INVALIDATION, keys);
}
@Override
diff --git a/src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java b/src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java
index df6f99ca22..ca011cbb31 100644
--- a/src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java
+++ b/src/test/java/com/google/devtools/build/skyframe/GraphConcurrencyTest.java
@@ -380,8 +380,7 @@ public abstract class GraphConcurrencyTest {
} catch (InterruptedException e) {
throw new AssertionError(e);
}
- Map<SkyKey, NodeEntry> batchMap =
- graph.getBatchWithFieldHints(null, Reason.OTHER, batch, NodeEntryField.NO_FIELDS);
+ Map<SkyKey, NodeEntry> batchMap = graph.getBatch(null, Reason.OTHER, batch);
getBatchCountDownLatch.countDown();
assertThat(batchMap).hasSize(batch.size());
for (NodeEntry entry : batchMap.values()) {
diff --git a/src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java b/src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java
index af0049b52b..655b7f8276 100644
--- a/src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java
+++ b/src/test/java/com/google/devtools/build/skyframe/NotifyingHelper.java
@@ -19,7 +19,6 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Maps.EntryTransformer;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
import com.google.devtools.build.lib.util.GroupedList;
-import java.util.EnumSet;
import java.util.Map;
import java.util.Set;
@@ -126,13 +125,12 @@ public class NotifyingHelper {
}
@Override
- public Map<SkyKey, NodeEntry> getBatchWithFieldHints(
+ public Map<SkyKey, NodeEntry> getBatch(
@Nullable SkyKey requestor,
Reason reason,
- Iterable<SkyKey> keys,
- EnumSet<NodeEntryField> fields) {
+ Iterable<SkyKey> keys) {
return Maps.transformEntries(
- delegate.getBatchWithFieldHints(requestor, reason, keys, fields),
+ delegate.getBatch(requestor, reason, keys),
notifyingHelper.wrapEntry);
}
diff --git a/src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java b/src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java
index d6d3ab04c7..1aa32cebdb 100644
--- a/src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java
+++ b/src/test/java/com/google/devtools/build/skyframe/NotifyingInMemoryGraph.java
@@ -24,7 +24,7 @@ class NotifyingInMemoryGraph extends NotifyingHelper.NotifyingProcessableGraph
@Override
public Map<SkyKey, NodeEntry> getBatchForInvalidation(Iterable<SkyKey> keys) {
- return getBatchWithFieldHints(null, Reason.INVALIDATION, keys, NodeEntryField.ALL_FIELDS);
+ return getBatch(null, Reason.INVALIDATION, keys);
}
@Override