Replace test usages of DigestHashFunction#getDefaultUnchecked and implicit DigestHashFunction#getDefault calls by the actual default hash function. Also remove a bunch of unnecessary Clock injections.
PiperOrigin-RevId: 330572846
diff --git a/src/test/java/com/google/devtools/build/lib/server/PidFileWatcherTest.java b/src/test/java/com/google/devtools/build/lib/server/PidFileWatcherTest.java
index 5d43f9e..4896549 100644
--- a/src/test/java/com/google/devtools/build/lib/server/PidFileWatcherTest.java
+++ b/src/test/java/com/google/devtools/build/lib/server/PidFileWatcherTest.java
@@ -18,6 +18,7 @@
import static java.nio.charset.StandardCharsets.US_ASCII;
import static org.junit.Assert.assertThrows;
+import com.google.devtools.build.lib.vfs.DigestHashFunction;
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.Path;
@@ -40,7 +41,7 @@
@Before
public void setUp() {
- FileSystem fileSystem = new InMemoryFileSystem();
+ FileSystem fileSystem = new InMemoryFileSystem(DigestHashFunction.SHA256);
pidFile = fileSystem.getPath("/pid");
underTest =
new PidFileWatcher(