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



##########
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:
       It would be helpful to track down potential issues as opposed to 
introducing `Thread.sleep()`, which creates more test performance problems.

##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListSFTP.java
##########
@@ -93,7 +103,61 @@ public void testRunFileFound() {
 
         final MockFlowFile retrievedFile = 
runner.getFlowFilesForRelationship(ListSFTP.REL_SUCCESS).get(0);
         retrievedFile.assertAttributeEquals("sftp.listing.user", 
sshServer.getUsername());
-        retrievedFile.assertAttributeEquals(CoreAttributes.FILENAME.key(), 
tempFileName);
+    }
+
+    @Test
+    public void testRunWithRecordWriter() throws InitializationException, 
InterruptedException {
+        writeTempFile(3);
+        RecordSetWriterFactory recordWriter = getCsvRecordWriter();
+        runner.addControllerService("csv-record-writer", recordWriter);
+        runner.setProperty(AbstractListProcessor.RECORD_WRITER, 
"csv-record-writer");
+        runner.enableControllerService(recordWriter);
+        Thread.sleep(STABILITY_WAIT);

Review comment:
       Perhaps calling `runner.assertValid()` here would be helpful?

##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestDeduplicateRecord.java
##########
@@ -271,7 +271,7 @@ void doCountTests(int failure, int original, int 
duplicates, int notDuplicates,
         }
     }
 
-    private static final class MockCacheService<K, V> extends 
AbstractControllerService implements DistributedMapCacheClient {
+    static final class MockCacheService<K, V> extends 
AbstractControllerService implements DistributedMapCacheClient {

Review comment:
       Is this change necessary as part of this PR?




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