aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
diff options
context:
space:
mode:
authorGravatar aehlig <aehlig@google.com>2017-12-19 07:12:25 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-19 07:13:52 -0800
commitc801c393bcfabbe6e5058fd77ef2d67660c75da3 (patch)
tree1711325efe0f0e0fa9adb6d2aef8310a666e587b /src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
parent2918e78a2b3144d5cacc1ab20ab4626a72df797a (diff)
Automated rollback of commit 82e68b75304438c96ff878a0c2b8d18b42002486.
Fixes #4322, #4306. *** Reason for rollback *** Introduces a deadlock (see https://github.com/bazelbuild/bazel/issues/4322) *** Original change description *** Make FileSystem operate on LocalPath instead of Path. PiperOrigin-RevId: 179549866
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
index 04e41a3c79..6e83bbedca 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
@@ -48,7 +48,6 @@ import com.google.devtools.build.lib.vfs.Dirent;
import com.google.devtools.build.lib.vfs.FileStatus;
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
-import com.google.devtools.build.lib.vfs.LocalPath;
import com.google.devtools.build.lib.vfs.ModifiedFileSet;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.PathFragment;
@@ -77,8 +76,8 @@ import org.junit.runners.JUnit4;
public class IncrementalLoadingTest {
protected PackageCacheTester tester;
- private LocalPath throwOnReaddir = null;
- private LocalPath throwOnStat = null;
+ private Path throwOnReaddir = null;
+ private Path throwOnStat = null;
@Before
public final void createTester() throws Exception {
@@ -86,8 +85,7 @@ public class IncrementalLoadingTest {
FileSystem fs =
new InMemoryFileSystem(clock) {
@Override
- public Collection<Dirent> readdir(LocalPath path, boolean followSymlinks)
- throws IOException {
+ public Collection<Dirent> readdir(Path path, boolean followSymlinks) throws IOException {
if (path.equals(throwOnReaddir)) {
throw new FileNotFoundException(path.getPathString());
}
@@ -96,7 +94,7 @@ public class IncrementalLoadingTest {
@Nullable
@Override
- public FileStatus stat(LocalPath path, boolean followSymlinks) throws IOException {
+ public FileStatus stat(Path path, boolean followSymlinks) throws IOException {
if (path.equals(throwOnStat)) {
throw new IOException("bork " + path.getPathString());
}
@@ -339,7 +337,7 @@ public class IncrementalLoadingTest {
Path buildFile = tester.addFile("e/BUILD", "sh_library(name = 'e', data = glob(['*.txt']))");
Path parentDir = buildFile.getParentDirectory();
tester.addFile("e/data.txt");
- throwOnReaddir = parentDir.getLocalPath();
+ throwOnReaddir = parentDir;
tester.sync();
try {
tester.getTarget("//e:e");