kubaugust commented on code in PR #11817:
URL: https://github.com/apache/nifi/pull/11817#discussion_r4323905920


##########
nifi-commons/nifi-record/src/test/java/org/apache/nifi/serialization/record/TestDataTypeUtils.java:
##########
@@ -1688,4 +1690,88 @@ public void 
testMergeSchemasSingleSideNestedArrayFieldBecomesNullable() {
         assertTrue(merged.getField("tags").orElseThrow().isNullable());
         assertFalse(((ArrayDataType) 
merged.getField("tags").orElseThrow().getDataType()).isElementsNullable());
     }
+
+    @Test
+    public void 
testMergeDataTypesWithDeeplyNestedNonWiderRecordsCompletesQuickly() {
+        final DataType merged = 
assertTimeoutPreemptively(Duration.ofSeconds(10),
+            () -> DataTypeUtils.mergeDataTypes(createNestedRecordType(40, 
"a"), createNestedRecordType(40, "b")));
+
+        final RecordSchema mergedSchema = ((RecordDataType) 
merged).getChildSchema();
+        assertEquals(List.of("content", "a", "b"), 
mergedSchema.getFieldNames());
+    }
+
+    @Test
+    public void 
testMergeDataTypesWithChoiceOfDeeplyNestedNonWiderRecordsCompletesQuickly() {

Review Comment:
   Agreed that it's better to keep the tests short and readable. Removed since 
they bring little value



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to