Update actions to use NestedSet for inputs (part 2; tests)
This is in preparation for making NestedSet not implement Iterable. Unfortunately, doing so means that there is no longer a common super-type for NestedSet and Collection, which means that we have to use NestedSet for all action inputs.
PiperOrigin-RevId: 284911679
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
index 7effb91..ef150b3 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
@@ -39,6 +39,8 @@
import com.google.devtools.build.lib.actions.MutableActionGraph.ActionConflictException;
import com.google.devtools.build.lib.actions.util.ActionsTestUtil;
import com.google.devtools.build.lib.actions.util.TestAction.DummyAction;
+import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
+import com.google.devtools.build.lib.collect.nestedset.Order;
import com.google.devtools.build.lib.events.NullEventHandler;
import com.google.devtools.build.lib.skyframe.serialization.testutils.SerializationTester;
import com.google.devtools.build.lib.util.Pair;
@@ -137,7 +139,9 @@
file(treeFile2.getPath(), "src2");
Action action =
new DummyAction(
- ImmutableList.of(input1, input2, tree), output, MiddlemanType.AGGREGATING_MIDDLEMAN);
+ NestedSetBuilder.create(Order.STABLE_ORDER, input1, input2, tree),
+ output,
+ MiddlemanType.AGGREGATING_MIDDLEMAN);
actions.add(action);
file(input2.getPath(), "contents");
file(input1.getPath(), "source contents");
@@ -311,7 +315,7 @@
Artifact.DerivedArtifact output =
new Artifact.DerivedArtifact(
ArtifactRoot.asDerivedRoot(root, root.getRelative("out")), execPath, ALL_OWNER);
- actions.add(new DummyAction(ImmutableList.<Artifact>of(), output));
+ actions.add(new DummyAction(NestedSetBuilder.emptySet(Order.STABLE_ORDER), output));
output.setGeneratingActionKey(ActionLookupData.create(ALL_OWNER, actions.size() - 1));
return output;
}
@@ -325,7 +329,7 @@
private SpecialArtifact createDerivedTreeArtifactWithAction(String path) {
SpecialArtifact treeArtifact = createDerivedTreeArtifactOnly(path);
- actions.add(new DummyAction(ImmutableList.<Artifact>of(), treeArtifact));
+ actions.add(new DummyAction(NestedSetBuilder.emptySet(Order.STABLE_ORDER), treeArtifact));
return treeArtifact;
}