This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 3ee04b18b3 Fix ReturnValueIgnored on IdleProcessMetricsIT (#4764)
3ee04b18b3 is described below
commit 3ee04b18b3de3d9a836b903340f067b45559e36d
Author: Daniel Roberts <[email protected]>
AuthorDate: Fri Jul 26 00:18:20 2024 -0400
Fix ReturnValueIgnored on IdleProcessMetricsIT (#4764)
Fixes the compliation error with IdleProcessMetricsIT for not using the
return value of the stream.
---
.../org/apache/accumulo/test/functional/IdleProcessMetricsIT.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/test/src/main/java/org/apache/accumulo/test/functional/IdleProcessMetricsIT.java
b/test/src/main/java/org/apache/accumulo/test/functional/IdleProcessMetricsIT.java
index 05033b0e40..ca54665742 100644
---
a/test/src/main/java/org/apache/accumulo/test/functional/IdleProcessMetricsIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/functional/IdleProcessMetricsIT.java
@@ -18,11 +18,13 @@
*/
package org.apache.accumulo.test.functional;
+import static
org.apache.accumulo.test.compaction.ExternalCompactionTestUtils.MAX_DATA;
import static
org.apache.accumulo.test.compaction.ExternalCompactionTestUtils.QUEUE1;
import static
org.apache.accumulo.test.compaction.ExternalCompactionTestUtils.compact;
import static
org.apache.accumulo.test.compaction.ExternalCompactionTestUtils.createTable;
import static
org.apache.accumulo.test.compaction.ExternalCompactionTestUtils.verify;
import static
org.apache.accumulo.test.compaction.ExternalCompactionTestUtils.writeData;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.time.Duration;
@@ -30,7 +32,6 @@ import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.function.Function;
import org.apache.accumulo.compactor.Compactor;
import org.apache.accumulo.coordinator.CompactionCoordinator;
@@ -220,7 +221,7 @@ public class IdleProcessMetricsIT extends
SharedMiniClusterBase {
try (Scanner scanner = client.createScanner(table1,
Authorizations.EMPTY)) {
scanner.setConsistencyLevel(ScannerBase.ConsistencyLevel.EVENTUAL);
- scanner.stream().forEach(Function.identity()::apply); // iterate and
ignore
+ assertEquals(MAX_DATA, scanner.stream().count()); // Ensure that data
exists
}
log.info("Waiting for sserver to be not idle after starting a scan");