Use fake install_md5 string instead of null
This minor cleanup facilitates future changes which require a non-null value for the install_md5 in tests.
PiperOrigin-RevId: 759108148
Change-Id: I8bdb7ddab469f1138f4bf42a22cc5a777874220a
diff --git a/src/test/java/com/google/devtools/build/lib/query2/testutil/SkyframeQueryHelper.java b/src/test/java/com/google/devtools/build/lib/query2/testutil/SkyframeQueryHelper.java
index f9601a5..a295005 100644
--- a/src/test/java/com/google/devtools/build/lib/query2/testutil/SkyframeQueryHelper.java
+++ b/src/test/java/com/google/devtools/build/lib/query2/testutil/SkyframeQueryHelper.java
@@ -89,6 +89,8 @@
/** An implementation of AbstractQueryHelper to support testing bazel query. */
public abstract class SkyframeQueryHelper extends AbstractQueryHelper<Target> {
+ private static final String FAKE_INSTALL_MD5_STRING = "abcedf1234567890abcedf1234567890";
+
protected SkyframeExecutor skyframeExecutor;
protected FileSystem fileSystem =
new InMemoryFileSystem(BlazeClock.instance(), DigestHashFunction.SHA256);
@@ -124,7 +126,7 @@
outputBase,
outputBase.getRelative(ServerDirectories.EXECROOT),
useVirtualSourceRoot() ? Root.fromPath(rootDirectory) : null,
- /* installMD5= */ null),
+ FAKE_INSTALL_MD5_STRING),
rootDirectory,
/* defaultSystemJavabase= */ null,
analysisMock.getProductName());
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/AbstractCollectPackagesUnderDirectoryTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/AbstractCollectPackagesUnderDirectoryTest.java
index ed3f19a..fb8735e 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/AbstractCollectPackagesUnderDirectoryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/AbstractCollectPackagesUnderDirectoryTest.java
@@ -75,6 +75,8 @@
* SkyFunctions#COLLECT_PACKAGES_UNDER_DIRECTORY}.
*/
public abstract class AbstractCollectPackagesUnderDirectoryTest {
+ private static final String FAKE_INSTALL_MD5_STRING = "abcedf1234567890abcedf1234567890";
+
protected FileSystem fileSystem;
protected Root root;
protected Path workingDir;
@@ -100,7 +102,7 @@
fileSystem.getPath("/user_root"),
fileSystem.getPath("/execroot"),
useVirtualSourceRoot() ? root : null,
- null),
+ FAKE_INSTALL_MD5_STRING),
workingDir,
/* defaultSystemJavabase= */ null,
/* productName= */ "DummyProductNameForUnitTests");