simonbence commented on code in PR #7661:
URL: https://github.com/apache/nifi/pull/7661#discussion_r1341127238


##########
nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/JoinClusterWithDifferentFlow.java:
##########
@@ -106,100 +95,57 @@ public void testStartupWithDifferentFlow() throws 
IOException, NiFiClientExcepti
         node2.stop();
 
         final File node2ConfDir = new File(node2.getInstanceDirectory(), 
"conf");
-        final File flowXmlFile = new File(node2ConfDir, "flow.xml.gz");
-        Files.deleteIfExists(flowXmlFile.toPath());
-        
Files.copy(Paths.get("src/test/resources/flows/mismatched-flows/flow2.xml.gz"), 
flowXmlFile.toPath());
+        final File flowJsonFile = new File(node2ConfDir, "flow.json.gz");
+        Files.deleteIfExists(flowJsonFile.toPath());
+        
Files.copy(Paths.get("src/test/resources/flows/mismatched-flows/flow2.json.gz"),
 flowJsonFile.toPath());
 
         node2.start(true);
 
-        final File backupFile = getBackupFile(node2ConfDir);
-        final NodeDTO node2Dto = getNodeDtoByApiPort(5672);
+        while 
(getNifiClient().getControllerClient().getNodes().getCluster().getNodes().stream().filter(n
 -> n.getStatus().equals("CONNECTED")).count() != 2) {
+            Thread.sleep(3000);
+        }
 
+        final File backupFile = getBackupFile(node2ConfDir);
         verifyFlowContentsOnDisk(backupFile);
-        disconnectNode(node2Dto);
         verifyInMemoryFlowContents();
-
-        // Reconnect the node so that we can properly shutdown
-        reconnectNode(node2Dto);

Review Comment:
   Thanks! I would believe the previous logic did not work properly as it was 
before remoeval (it did a REST call against the endpoint 
`cluster/nodes/${nodeId}` which behaves based on the accompanying `NodeEntity` 
/ `NodeDTO`, but the status was not set to be DISCONNECTING, so in practice I 
think it did not disconnect), but thanks for the context! I will look how it 
behaves this way



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