thenatog commented on a change in pull request #5885:
URL: https://github.com/apache/nifi/pull/5885#discussion_r835524899



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListSFTP.java
##########
@@ -74,12 +82,14 @@ public void setUp() throws Exception {
     @After
     public void tearDown() throws Exception {
         sshServer.stopServer();
+        Files.deleteIfExists(Paths.get(sshServer.getVirtualFileSystemPath()));
     }
 
     @Test
-    public void testRunFileFound() {
+    public void testRunFileFound() throws InterruptedException {
+        writeTempFile(1);
+        Thread.sleep(STABILITY_WAIT);

Review comment:
       I've been trying to figure out what I can do about this. The issue is 
that I will intermittently see '        
runner.assertTransferCount(ListSFTP.REL_SUCCESS, 1);' fail with a result of 0.
   
   I've tried:
   - Asserting that the file count available in the virtual SSH/SFTP server 
matches the number created for the test (the files are present to be listed)
   - Asserting that the runner is valid
   - Asserting that the controller services are valid
   
   I've currently got it working, rather than using a thread sleep, by setting 
the runner's scheduler to 500ms instead, and running 2 iterations... If that's 
not acceptable, I may need to perform the test in TestAbstractListProcessor. 
However it seems like it could be useful to increase the testing coverage for 
TestListSFTP.




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