From 20bfe16d11a5116a31eb15bd29693dcd20210c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 19 Sep 2017 11:26:51 +0300 Subject: [PATCH] Remove unnecessary sleeps Every time MaxScale was restarted, the test waited for a total of 25 seconds. As MaxScale should start before the command returns, the sleep is not necessary. Added StartLimitBurst=0 to the systemd service file to allow rapid restarts of MaxScale. --- etc/maxscale.service.in | 1 + maxscale-system-test/testconnections.cpp | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/etc/maxscale.service.in b/etc/maxscale.service.in index 5e04afa08..9b1c1299e 100644 --- a/etc/maxscale.service.in +++ b/etc/maxscale.service.in @@ -19,6 +19,7 @@ Group=maxscale ExecStart=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale TimeoutStartSec=120 LimitNOFILE=65535 +StartLimitBurst=0 [Install] WantedBy=multi-user.target diff --git a/maxscale-system-test/testconnections.cpp b/maxscale-system-test/testconnections.cpp index 487a95814..563c30d2f 100644 --- a/maxscale-system-test/testconnections.cpp +++ b/maxscale-system-test/testconnections.cpp @@ -701,19 +701,15 @@ int TestConnections::close_maxscale_connections() int TestConnections::restart_maxscale() { - sleep(15); int res = ssh_maxscale(true, "service maxscale restart"); fflush(stdout); - sleep(10); return res; } int TestConnections::start_maxscale() { - sleep(15); int res = ssh_maxscale(true, "service maxscale start"); fflush(stdout); - sleep(10); return res; }