Lehel44 commented on code in PR #5964:
URL: https://github.com/apache/nifi/pull/5964#discussion_r850544661


##########
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestXMLReader.java:
##########
@@ -279,4 +279,23 @@ public void 
testInferSchemaContentFieldNameSetSubElementExistsNoNameClash() thro
         String actualContent = out.getContent();
         assertEquals(expectedContent, actualContent);
     }
+
+    @Test
+    public void testInferSchemaIgnoreAttributes() throws 
InitializationException, IOException {
+        String expectedContent = "MapRecord[{software=Apache NiFi, num=123, 
name=John Doe}]";
+
+        Map<PropertyDescriptor, String> xmlReaderProperties = new HashMap<>();
+        xmlReaderProperties.put(SchemaAccessUtils.SCHEMA_ACCESS_STRATEGY, 
SchemaInferenceUtil.INFER_SCHEMA.getValue());
+        xmlReaderProperties.put(XMLReader.RECORD_FORMAT, 
XMLReader.RECORD_SINGLE.getValue());
+        xmlReaderProperties.put(XMLReader.PARSE_XML_ATTRIBUTES, "false");
+        TestRunner runner = setup(xmlReaderProperties);
+
+        InputStream is = new 
FileInputStream("src/test/resources/xml/person_record.xml");
+        runner.enqueue(is);
+        runner.run();
+
+        MockFlowFile out = 
runner.getFlowFilesForRelationship(TestXMLReaderProcessor.SUCCESS).get(0);
+        String actualContent = out.getContent();
+        assertEquals(expectedContent, actualContent);

Review Comment:
   Could you please replace the assertEquals import with org.junit.jupiter.api?



-- 
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