NIFI-7274 add time for test conditions to be met

This commit is contained in:
Joe Witt 2020-03-22 09:54:43 -04:00
parent 2feeb57159
commit 254b20fa5f
No known key found for this signature in database
GPG Key ID: 9093BF854F811A1A
2 changed files with 5 additions and 1 deletions

View File

@ -633,7 +633,9 @@ public class TestStandardProcessScheduler {
procNode.performValidation();
scheduler.startProcessor(procNode, true);
Thread.sleep(100L);
while(proc.getOnScheduledInvocationCount() < 1){
Thread.sleep(100L);
}
assertEquals(1, proc.getOnScheduledInvocationCount());
Thread.sleep(100L);
assertEquals(1, proc.getOnScheduledInvocationCount());

View File

@ -420,6 +420,8 @@ public class DBCPServiceTest {
server.shutdown();
server.start();
Thread.sleep(2500L); //allow time to pass for the server to startup.
// Note!! We should not get something like:
// org.h2.jdbc.JdbcSQLException: Connection is broken: "session closed" [90067-192]
// Pool should remove invalid connections and create new valid connections.