Hexoplon commented on code in PR #7787:
URL: https://github.com/apache/nifi/pull/7787#discussion_r1353434747
##########
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:
Test now makes use of a json flow file for importing test data.
--
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]