diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java index 8baaa26564..cae9840216 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java @@ -169,7 +169,7 @@ public class RemoteSpawnCacheTest { ImmutableMap.of("VARIABLE", "value"), /*executionInfo=*/ ImmutableMap.<String, String>of(), /*inputs=*/ ImmutableList.of(ActionInputHelper.fromPath("input")), - /*outputs=*/ ImmutableList.<ActionInput>of(), + /*outputs=*/ ImmutableList.of(ActionInputHelper.fromPath("/random/file")), ResourceSet.ZERO); Path stdout = fs.getPath("/tmp/stdout"); @@ -273,7 +273,7 @@ public class RemoteSpawnCacheTest { }) .when(remoteCache) .upload(any(ActionKey.class), any(Path.class), eq(outputFiles), eq(outErr), eq(true)); - entry.store(result, outputFiles); + entry.store(result); verify(remoteCache) .upload(any(ActionKey.class), any(Path.class), eq(outputFiles), eq(outErr), eq(true)); assertThat(progressUpdates) @@ -285,14 +285,15 @@ public class RemoteSpawnCacheTest { // Checks that spawns that have mayBeCached false are not looked up in the remote cache, // and also that their result is not uploaded to the remote cache. The artifacts, however, // are uploaded. - SimpleSpawn uncacheableSpawn = new SimpleSpawn( - new FakeOwner("foo", "bar"), - /*arguments=*/ ImmutableList.of(), - /*environment=*/ ImmutableMap.of(), - ImmutableMap.of(ExecutionRequirements.NO_CACHE, ""), - /*inputs=*/ ImmutableList.of(), - /*outputs=*/ ImmutableList.<ActionInput>of(), - ResourceSet.ZERO); + SimpleSpawn uncacheableSpawn = + new SimpleSpawn( + new FakeOwner("foo", "bar"), + /*arguments=*/ ImmutableList.of(), + /*environment=*/ ImmutableMap.of(), + ImmutableMap.of(ExecutionRequirements.NO_CACHE, ""), + /*inputs=*/ ImmutableList.of(), + /*outputs=*/ ImmutableList.of(ActionInputHelper.fromPath("/random/file")), + ResourceSet.ZERO); CacheHandle entry = cache.lookup(uncacheableSpawn, simplePolicy); verify(remoteCache, never()) .getCachedActionResult(any(ActionKey.class)); @@ -303,8 +304,8 @@ public class RemoteSpawnCacheTest { .setStatus(Status.SUCCESS) .setRunnerName("test") .build(); + entry.store(result); ImmutableList<Path> outputFiles = ImmutableList.of(fs.getPath("/random/file")); - entry.store(result, outputFiles); verify(remoteCache) .upload(any(ActionKey.class), any(Path.class), eq(outputFiles), eq(outErr), eq(false)); assertThat(progressUpdates).containsExactly(); @@ -324,7 +325,7 @@ public class RemoteSpawnCacheTest { .setRunnerName("test") .build(); ImmutableList<Path> outputFiles = ImmutableList.of(fs.getPath("/random/file")); - entry.store(result, outputFiles); + entry.store(result); verify(remoteCache) .upload(any(ActionKey.class), any(Path.class), eq(outputFiles), eq(outErr), eq(false)); assertThat(progressUpdates) @@ -347,7 +348,7 @@ public class RemoteSpawnCacheTest { .when(remoteCache) .upload(any(ActionKey.class), any(Path.class), eq(outputFiles), eq(outErr), eq(true)); - entry.store(result, outputFiles); + entry.store(result); verify(remoteCache) .upload(any(ActionKey.class), any(Path.class), eq(outputFiles), eq(outErr), eq(true)); |