aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/worker/WorkerFactoryTest.java
diff options
context:
space:
mode:
authorGravatar philwo <philwo@google.com>2018-04-16 06:40:19 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-16 06:41:42 -0700
commitd3de5cc7e25e56fba666e1f39a9ebf3c76fdd69c (patch)
tree02716ad2664f1823976642c4344af7a3702d07a1 /src/test/java/com/google/devtools/build/lib/worker/WorkerFactoryTest.java
parent8caa745545a1757fe93c6684d5ab98a47fa2718c (diff)
Big round of sandbox fixes / performance improvements. - The number of stat() syscalls in the SymlinkedSandboxedSpawn was way too high. Do less, feel better. - When using --experimental_sandbox_base, ensure that symlinks in the path are resolved. Before this, you had to check whether on your system /dev/shm is a symlink to /run/shm and then use that instead. Now it no longer matters, as symlinks are resolved. - Remove an unnecessary directory creation from each sandboxed invocation. Turns out that the "tmpdir" that we created was no longer used after some changes to Bazel's TMPDIR handling. - Use simpler sandbox paths, by using the unique ID for each Spawn provided by SpawnExecutionPolicy instead of a randomly generated temp folder name. This also saves a round-trip from our VFS to NIO and back. Clean up the sandbox base before each build to ensure that the unique IDs are actually unique. ;) - Use Java 8's Process#isAlive to check whether a process is alive instead of trying to get the exitcode and catching an exception. Closes #4913. PiperOrigin-RevId: 193031017
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/worker/WorkerFactoryTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/worker/WorkerFactoryTest.java3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/worker/WorkerFactoryTest.java b/src/test/java/com/google/devtools/build/lib/worker/WorkerFactoryTest.java
index 27c0d4af1f..0552cb8c5a 100644
--- a/src/test/java/com/google/devtools/build/lib/worker/WorkerFactoryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/worker/WorkerFactoryTest.java
@@ -17,7 +17,6 @@ import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.hash.HashCode;
import com.google.devtools.build.lib.vfs.FileSystem;
@@ -49,8 +48,6 @@ public class WorkerFactoryTest {
"dummy",
HashCode.fromInt(0),
ImmutableSortedMap.of(),
- ImmutableMap.of(),
- ImmutableSet.of(),
true);
Path sandboxedWorkerPath = workerFactory.getSandboxedWorkerPath(workerKey, 1);