mirror of https://github.com/apache/nifi.git
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:
parent
6c76ecadd4
commit
9e7e39fc2a
|
@ -297,7 +297,7 @@ public class TestFTP {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testListFtpHostPortVariablesFileFound() {
|
public void testListFtpHostPortVariablesFileFound() throws InterruptedException {
|
||||||
final FileSystem fs = fakeFtpServer.getFileSystem();
|
final FileSystem fs = fakeFtpServer.getFileSystem();
|
||||||
|
|
||||||
final FileEntry fileEntry = new FileEntry("c:\\data\\found");
|
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.setProperty(ListFile.TARGET_SYSTEM_TIMESTAMP_PRECISION, ListFile.PRECISION_MILLIS);
|
||||||
|
|
||||||
runner.enqueue(new byte[0]);
|
runner.enqueue(new byte[0]);
|
||||||
|
|
||||||
|
// Ensure wait for enough lag time.
|
||||||
|
Thread.sleep(AbstractListProcessor.LISTING_LAG_MILLIS.get(TimeUnit.MILLISECONDS) * 2);
|
||||||
|
|
||||||
runner.run();
|
runner.run();
|
||||||
|
|
||||||
runner.assertTransferCount(ListFTP.REL_SUCCESS, 1);
|
runner.assertTransferCount(ListFTP.REL_SUCCESS, 1);
|
||||||
|
|
Loading…
Reference in New Issue