diff options
author | 2017-06-09 09:49:07 -0400 | |
---|---|---|
committer | 2017-06-09 10:57:27 -0400 | |
commit | cda9b9c31933b8c29beec6fe5fa1ed0270859d0b (patch) | |
tree | 745feec4ecce1bb53203f61564d3c8eabff8848b /src/test/java/com/google/devtools/build | |
parent | 15e92987c34f4c53affb008f00c2b92b58812f5c (diff) |
Remote execution: post CAS links to the BEP instead of local file URIs
Also use DigestUtils for performance, which has a static cache of the digests.
This isn't ideal, but necessary for now to avoid computing the digests multiple
times. We'll need to clean this up afterwards by including the digests in the
posted events, and making them available to the PathConverter. I have some
changes towards that (as well as some submitted already), but it requires
quite some refactoring.
RELNOTES: Bazel posts links to the CAS to the BEP if remote caching / execution is enabled
PiperOrigin-RevId: 158513165
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/GrpcActionCacheTest.java | 2 | ||||
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcActionCacheTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcActionCacheTest.java index 3cb2bd218c..b3595dca3e 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/GrpcActionCacheTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcActionCacheTest.java @@ -30,6 +30,7 @@ import com.google.devtools.build.lib.actions.ActionInputHelper; import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions; import com.google.devtools.build.lib.testutil.Scratch; import com.google.devtools.build.lib.vfs.FileSystem; +import com.google.devtools.build.lib.vfs.FileSystem.HashFunction; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem; @@ -73,6 +74,7 @@ public class GrpcActionCacheTest { @Before public final void setUp() throws Exception { + FileSystem.setDigestFunctionForTesting(HashFunction.SHA1); // Use a mutable service registry for later registering the service impl for each test case. fakeServer = InProcessServerBuilder.forName(fakeServerName) diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java index c648fae09f..2d9fa6723e 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java @@ -38,6 +38,7 @@ import com.google.devtools.build.lib.exec.SpawnRunner.SpawnExecutionPolicy; import com.google.devtools.build.lib.exec.util.FakeOwner; import com.google.devtools.build.lib.util.io.FileOutErr; import com.google.devtools.build.lib.vfs.FileSystem; +import com.google.devtools.build.lib.vfs.FileSystem.HashFunction; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; @@ -136,6 +137,7 @@ public class GrpcRemoteExecutionClientTest { @Before public final void setUp() throws Exception { + FileSystem.setDigestFunctionForTesting(HashFunction.SHA1); String fakeServerName = "fake server for " + getClass(); // Use a mutable service registry for later registering the service impl for each test case. fakeServer = |