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.
@@ -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);
