diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/scheduling/TestStandardProcessScheduler.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/scheduling/TestStandardProcessScheduler.java index 90bbbbb5e6..01e368ead5 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/scheduling/TestStandardProcessScheduler.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/scheduling/TestStandardProcessScheduler.java @@ -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()); diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java index fdad692253..6071474c09 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java @@ -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.