mirror of https://github.com/apache/nifi.git
NIFI-1145 Providing delays in tests where resources are being initialized to allow heavily taxed environments sufficient time.
This commit is contained in:
parent
c18514fe2f
commit
47453d2c47
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue