From 2d0b2e896a50a52fbf6764dd54e3d1454bf6bc1e Mon Sep 17 00:00:00 2001 From: janakr Date: Fri, 14 Jul 2017 00:28:58 +0200 Subject: Don't pass in our own source root. ScopeEscapableFileSystem doesn't like it in some situations (which I don't fully understand). Fixes failing Bazel test. PiperOrigin-RevId: 161874315 --- .../devtools/build/lib/analysis/AnalysisWithIOExceptionsTest.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib/analysis') diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AnalysisWithIOExceptionsTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AnalysisWithIOExceptionsTest.java index 7610f637cb..00e55e825b 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/AnalysisWithIOExceptionsTest.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/AnalysisWithIOExceptionsTest.java @@ -20,7 +20,6 @@ import com.google.devtools.build.lib.util.BlazeClock; import com.google.devtools.build.lib.vfs.FileStatus; import com.google.devtools.build.lib.vfs.FileSystem; import com.google.devtools.build.lib.vfs.Path; -import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem; import java.io.IOException; import java.util.function.Function; @@ -31,15 +30,13 @@ import org.junit.runners.JUnit4; /** {@link AnalysisTestCase} with custom filesystem that can throw on stat if desired. */ @RunWith(JUnit4.class) public class AnalysisWithIOExceptionsTest extends AnalysisTestCase { - private static final String FS_ROOT = "/fsg"; - private static final Function NULL_FUNCTION = (path) -> null; private Function crashMessage = NULL_FUNCTION; @Override protected FileSystem createFileSystem() { - return new InMemoryFileSystem(BlazeClock.instance(), PathFragment.create(FS_ROOT)) { + return new InMemoryFileSystem(BlazeClock.instance()) { @Override public FileStatus stat(Path path, boolean followSymlinks) throws IOException { String crash = crashMessage.apply(path); -- cgit v1.2.3