diff options
author | 2017-07-14 00:28:58 +0200 | |
---|---|---|
committer | 2017-07-14 10:52:19 +0200 | |
commit | 2d0b2e896a50a52fbf6764dd54e3d1454bf6bc1e (patch) | |
tree | 374720519b8fe8fe50fe58d99fc2fdf5beb67325 /src/test/java/com/google/devtools/build/lib/analysis | |
parent | ae1e81e8555ce1fa44309354f1055e18748d1189 (diff) |
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
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/analysis')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/analysis/AnalysisWithIOExceptionsTest.java | 5 |
1 files changed, 1 insertions, 4 deletions
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<Path, String> NULL_FUNCTION = (path) -> null; private Function<Path, String> 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); |