dan-s1 commented on code in PR #9807:
URL: https://github.com/apache/nifi/pull/9807#discussion_r1999196341
##########
nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/ConsumeKafkaRecordIT.java:
##########
@@ -78,6 +85,45 @@ void testProcessingStrategyRecordNoRecords() {
runner.assertAllFlowFilesTransferred(ConsumeKafka.SUCCESS, 0);
}
+ @Test
+ void testInvalidRecordInMiddle() throws ExecutionException,
InterruptedException {
+ testSingleInvalidRecord("testInvalidRecordInMiddle",
VALID_RECORD_1_TEXT, INVALID_RECORD_TEXT, VALID_RECORD_2_TEXT);
+ }
+
+ @Test
+ void testInvalidRecordAtEnd() throws ExecutionException,
InterruptedException {
+ testSingleInvalidRecord("testInvalidRecordAtEnd", VALID_RECORD_1_TEXT,
VALID_RECORD_2_TEXT, INVALID_RECORD_TEXT);
+ }
+
+ @Test
+ void testInvalidRecordAtStart() throws ExecutionException,
InterruptedException {
+ testSingleInvalidRecord("testInvalidRecordAtStart",
INVALID_RECORD_TEXT, VALID_RECORD_1_TEXT, VALID_RECORD_2_TEXT);
+ }
Review Comment:
Instead of adding three individual tests create one JUnit5
`ParamaterizedTest` and name the tests with your method source argument using
`Arguments.argumentSet`. You can then just have the contents of
`testSingleInvalidRecord` in that test.
--
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]