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:
@ -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
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user