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 05eb782729..770bb477d0 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 @@ -414,11 +414,11 @@ public class TestStandardProcessScheduler { LongEnablingService ts = (LongEnablingService) serviceNode.getControllerServiceImplementation(); ts.setLimit(3000); scheduler.enableControllerService(serviceNode); - Thread.sleep(100); + Thread.sleep(500); assertTrue(serviceNode.isActive()); assertEquals(1, ts.enableInvocationCount()); - Thread.sleep(100); + Thread.sleep(500); scheduler.disableControllerService(serviceNode); assertFalse(serviceNode.isActive()); assertEquals(ControllerServiceState.DISABLING, serviceNode.getState()); diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestInvokeHttpSSL.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestInvokeHttpSSL.java index b3cd9dc7a2..655492f219 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestInvokeHttpSSL.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestInvokeHttpSSL.java @@ -47,6 +47,8 @@ public class TestInvokeHttpSSL extends TestInvokeHttpCommon { server = createServer(); server.startServer(); + // Allow time for the server to start + Thread.sleep(500); // this is the base url with the random port url = server.getSecureUrl(); } @@ -64,6 +66,13 @@ public class TestInvokeHttpSSL extends TestInvokeHttpCommon { runner.enableControllerService(sslService); runner.setProperty(InvokeHTTP.PROP_SSL_CONTEXT_SERVICE, "ssl-context"); + // Allow time for the controller service to fully initialize + Thread.sleep(500); + + // Provide more time to setup and run + runner.setProperty(InvokeHTTP.PROP_READ_TIMEOUT, "30 secs"); + runner.setProperty(InvokeHTTP.PROP_CONNECT_TIMEOUT, "30 secs"); + server.clearHandlers(); } diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java index ff147d7974..5fb26c8fab 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenSyslog.java @@ -126,6 +126,9 @@ public class TestListenSyslog { final ProcessContext context = runner.getProcessContext(); proc.onScheduled(context); + // Allow time for the processor to perform its scheduled start + Thread.sleep(500); + final int numMessages = 20; final int port = proc.getPort(); Assert.assertTrue(port > 0); diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestServer.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestServer.java index 7e5dd7b7b8..4410ca50fc 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestServer.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestServer.java @@ -70,6 +70,8 @@ public class TestServer { private void createConnector() { final ServerConnector http = new ServerConnector(jetty); http.setPort(0); + // Severely taxed environments may have significant delays when executing. + http.setIdleTimeout(30000L); jetty.addConnector(http); } @@ -100,6 +102,8 @@ public class TestServer { // set host and port https.setPort(0); + // Severely taxed environments may have significant delays when executing. + https.setIdleTimeout(30000L); // add the connector jetty.addConnector(https);