exceptionfactory commented on code in PR #7787:
URL: https://github.com/apache/nifi/pull/7787#discussion_r1348159266
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/conf/parameter-context-flow-description.xml:
##########
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Review Comment:
The flow.xml format is being removed for NIFI-11772 under PR #7661, so the
test should be changed to use the JSON serialized version.
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestFlowController.java:
##########
@@ -492,17 +492,41 @@ public void
testCreateParameterContextWithAndWithoutValidation() throws IOExcept
// This is not wrapped in
FlowManager#withParameterContextResolution(Runnable), so it will throw an
exception
assertThrows(IllegalStateException.class, () ->
- controller.getFlowManager().createParameterContext("id",
"name", parameters,
Collections.singletonList(existingParameterContext.getIdentifier()), null));
+ controller.getFlowManager().createParameterContext("id",
"name", "description", parameters,
Collections.singletonList(existingParameterContext.getIdentifier()), null));
// Instead, this is how it should be called
controller.getFlowManager().withParameterContextResolution(() ->
controller
- .getFlowManager().createParameterContext("id2", "name2",
parameters,
Collections.singletonList(existingParameterContext.getIdentifier()), null));
+ .getFlowManager().createParameterContext("id2", "name2",
"description2", parameters,
Collections.singletonList(existingParameterContext.getIdentifier()), null));
} finally {
purgeFlow();
}
}
+ @Test
+ public void testCreateParameterContextLoadsDescription() throws
IOException {
+ final File flowFile = new
File("src/test/resources/conf/parameter-context-flow-description.xml");
Review Comment:
The flow.xml format is being removed in favor flow.json, so this test should
be changed to use the current JSON format instead of XML.
--
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]