Remove the minimum value of 1 in RamResourceConverter and delete a test.
This functionality was added to production code solely because some tests used LocalHostCapacity wrong, so I fixed said tests instead.
The test was also bogus because RamResourceConverter used the available RAM when RamResourceConverter was instantiated, which means that its correctness apparently depended on which test cases (if any) were run before this test. I do admit, though, that I haven't investigated very thoroughly what exact mechanism causes RamResourceConverter to be instantiated.
RELNOTES: None.
PiperOrigin-RevId: 249645361
diff --git a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
index 205e5eb..fe41141 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
@@ -580,11 +580,7 @@
super(
ImmutableMap.of(
"HOST_RAM",
- // Some tests seem to set local host RAM to 0, so we adjust host RAM to 1 here
- // to make sure the default is valid.
- () ->
- Math.max(
- 1, (int) Math.ceil(LocalHostCapacity.getLocalHostCapacity().getMemoryMb()))),
+ () -> (int) Math.ceil(LocalHostCapacity.getLocalHostCapacity().getMemoryMb())),
1,
Integer.MAX_VALUE);
}