From 65201ab88b16ce7c232f0b47230be7e33c43cbf7 Mon Sep 17 00:00:00 2001 From: zhewenf2 Date: Thu, 13 Oct 2022 21:12:21 -0500 Subject: [PATCH] NIFI-10642 Fix flaky test groupByStringMixedNumberOfRecords Signed-off-by: Matthew Burgess This closes #6528 --- .../apache/nifi/processors/standard/TestPartitionRecord.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPartitionRecord.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPartitionRecord.java index 429163ddcd..0df24eac68 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPartitionRecord.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPartitionRecord.java @@ -83,7 +83,7 @@ public class TestPartitionRecord { assertEquals(1L, out.stream().filter(ff -> ff.getAttribute("record.count").equals("2")).count()); out.forEach(ff -> ff.assertAttributeEquals("fragment.count", "4")); IntStream.of(1, 3).forEach((i) -> out.get(i).assertAttributeEquals("fragment.id", out.get(0).getAttribute("fragment.id"))); - IntStream.of(0, 3).forEach((i) -> out.get(i).assertAttributeEquals("fragment.index", String.valueOf(i))); + IntStream.of(0, 3).forEach((i) -> assertEquals(1L, out.stream().filter(ff -> ff.getAttribute("fragment.index").equals(String.valueOf(i))).count())); out.stream().filter(ff -> ff.getAttribute("record.count").equals("2")).forEach(ff -> ff.assertContentEquals("Jake,49,\nJake,14,\n"));