NIFI-12826 Added timing lag in TestFTP method for improved stability

This closes #8443

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
Joseph Witt 2024-02-21 13:11:21 -07:00 committed by exceptionfactory
parent 6c76ecadd4
commit 9e7e39fc2a
No known key found for this signature in database
GPG Key ID: 29B6A52D2AAE8DBA
1 changed files with 5 additions and 1 deletions

View File

@ -297,7 +297,7 @@ public class TestFTP {
}
@Test
public void testListFtpHostPortVariablesFileFound() {
public void testListFtpHostPortVariablesFileFound() throws InterruptedException {
final FileSystem fs = fakeFtpServer.getFileSystem();
final FileEntry fileEntry = new FileEntry("c:\\data\\found");
@ -314,6 +314,10 @@ public class TestFTP {
runner.setProperty(ListFile.TARGET_SYSTEM_TIMESTAMP_PRECISION, ListFile.PRECISION_MILLIS);
runner.enqueue(new byte[0]);
// Ensure wait for enough lag time.
Thread.sleep(AbstractListProcessor.LISTING_LAG_MILLIS.get(TimeUnit.MILLISECONDS) * 2);
runner.run();
runner.assertTransferCount(ListFTP.REL_SUCCESS, 1);