markap14 commented on code in PR #5931:
URL: https://github.com/apache/nifi/pull/5931#discussion_r844437876
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/integration/versioned/ImportFlowIT.java:
##########
@@ -431,18 +431,18 @@ public void
testUpdateFlowWithInputPortMovedFromGroupAToGroupB() {
assertTrue(groupA.getProcessors().isEmpty());
assertTrue(groupA.getConnections().isEmpty());
assertEquals(1, groupA.getInputPorts().size());
- assertEquals(port.getVersionedComponentId(),
groupA.getInputPorts().stream().findFirst().get().getVersionedComponentId());
+ assertEquals(port.getName(),
groupA.getInputPorts().stream().findFirst().get().getName());
//Change Process Group A version to Version 2
groupA.updateFlow(version2, null, false, true, true);
//Process Group A should have a Process Group, a Processor and a
Connection and no Input Ports
assertEquals(1, groupA.getProcessGroups().size());
- assertEquals(groupB.getVersionedComponentId(),
groupA.getProcessGroups().stream().findFirst().get().getVersionedComponentId());
+ assertEquals(groupB.getName(),
groupA.getProcessGroups().stream().findFirst().get().getName());
assertEquals(1, groupA.getProcessors().size());
- assertEquals(processor.getVersionedComponentId(),
groupA.getProcessors().stream().findFirst().get().getVersionedComponentId());
+ assertEquals(processor.getName(),
groupA.getProcessors().stream().findFirst().get().getName());
assertEquals(1, groupA.getConnections().size());
- assertEquals(connection.getVersionedComponentId(),
groupA.getConnections().stream().findFirst().get().getVersionedComponentId());
+ assertEquals(connection.getName(),
groupA.getConnections().stream().findFirst().get().getName());
Review Comment:
Why do we have all these changes from ID comparison to name comparison? The
name is not really relevant here, the ID is. And the IDs should not change. I
think it was correct as it was, no?
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/integration/versioned/ImportFlowIT.java:
##########
@@ -431,18 +431,18 @@ public void
testUpdateFlowWithInputPortMovedFromGroupAToGroupB() {
assertTrue(groupA.getProcessors().isEmpty());
assertTrue(groupA.getConnections().isEmpty());
assertEquals(1, groupA.getInputPorts().size());
- assertEquals(port.getVersionedComponentId(),
groupA.getInputPorts().stream().findFirst().get().getVersionedComponentId());
+ assertEquals(port.getName(),
groupA.getInputPorts().stream().findFirst().get().getName());
//Change Process Group A version to Version 2
groupA.updateFlow(version2, null, false, true, true);
//Process Group A should have a Process Group, a Processor and a
Connection and no Input Ports
assertEquals(1, groupA.getProcessGroups().size());
- assertEquals(groupB.getVersionedComponentId(),
groupA.getProcessGroups().stream().findFirst().get().getVersionedComponentId());
+ assertEquals(groupB.getName(),
groupA.getProcessGroups().stream().findFirst().get().getName());
assertEquals(1, groupA.getProcessors().size());
- assertEquals(processor.getVersionedComponentId(),
groupA.getProcessors().stream().findFirst().get().getVersionedComponentId());
+ assertEquals(processor.getName(),
groupA.getProcessors().stream().findFirst().get().getName());
assertEquals(1, groupA.getConnections().size());
- assertEquals(connection.getVersionedComponentId(),
groupA.getConnections().stream().findFirst().get().getVersionedComponentId());
+ assertEquals(connection.getName(),
groupA.getConnections().stream().findFirst().get().getName());
Review Comment:
Why do we have all these changes from ID comparison to name comparison? The
name is not really relevant here, the ID is. And the IDs should not change. I
think it was correct as it was, no?
--
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]