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.
This commit is contained in:
Markus Mäkelä
2017-09-19 11:26:51 +03:00
parent 17f6edbfc0
commit 20bfe16d11
2 changed files with 1 additions and 4 deletions

View File

@ -19,6 +19,7 @@ Group=maxscale
ExecStart=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale ExecStart=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale
TimeoutStartSec=120 TimeoutStartSec=120
LimitNOFILE=65535 LimitNOFILE=65535
StartLimitBurst=0
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -701,19 +701,15 @@ int TestConnections::close_maxscale_connections()
int TestConnections::restart_maxscale() int TestConnections::restart_maxscale()
{ {
sleep(15);
int res = ssh_maxscale(true, "service maxscale restart"); int res = ssh_maxscale(true, "service maxscale restart");
fflush(stdout); fflush(stdout);
sleep(10);
return res; return res;
} }
int TestConnections::start_maxscale() int TestConnections::start_maxscale()
{ {
sleep(15);
int res = ssh_maxscale(true, "service maxscale start"); int res = ssh_maxscale(true, "service maxscale start");
fflush(stdout); fflush(stdout);
sleep(10);
return res; return res;
} }