Rephrase InMemoryFileSystem in terms of error codes rather than exceptions, enabling better performance on statIfFound() / statNullable() calls.
RELNOTES: None
PiperOrigin-RevId: 212306308
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
index c23b003..6f8a519 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
@@ -175,11 +175,11 @@
setupRoot(
new CustomInMemoryFs() {
@Override
- public FileStatus stat(Path path, boolean followSymlinks) throws IOException {
+ public FileStatus statIfFound(Path path, boolean followSymlinks) throws IOException {
if (path.getBaseName().equals("bad")) {
throw exception;
}
- return super.stat(path, followSymlinks);
+ return super.statIfFound(path, followSymlinks);
}
});
try {