Remove special handling of SpawnActionContext in Executor/ActionExecContext
Instead, internally look up the correct context by mnemonic. This simplifies
all the callers. We still need a little bit of special casing when constructing
the action context map.
PiperOrigin-RevId: 197572357
diff --git a/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java b/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java
index d4ecd6c..da31f12 100644
--- a/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java
@@ -172,14 +172,14 @@
@Test
public void testBinTrueExecutesFine() throws Exception {
Spawn spawn = createSpawn(getTrueCommand());
- executor.getSpawnActionContext(spawn).exec(spawn, createContext());
+ executor.getContext(SpawnActionContext.class).exec(spawn, createContext());
assertThat(out()).isEmpty();
assertThat(err()).isEmpty();
}
private List<SpawnResult> run(Spawn spawn) throws Exception {
- return executor.getSpawnActionContext(spawn).exec(spawn, createContext());
+ return executor.getContext(SpawnActionContext.class).exec(spawn, createContext());
}
private ActionExecutionContext createContext() {