Improve shutdown in the test script

This commit is contained in:
Jonas Lochmann 2021-03-08 01:00:00 +01:00
parent 24563bdc4a
commit 21d7fa839f
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36
3 changed files with 10 additions and 4 deletions

View file

@ -64,7 +64,11 @@ async function startMariadb() {
}
return {
shutdown: () => task.kill('SIGINT'),
shutdown: () => {
spawnAsync('mysql', ['-S', socketPath, '-u', 'root', '-e', 'SHUTDOWN;'], { stdio: 'inherit' }).catch((ex) => {
console.warn(ex)
})
},
socketPath,
dataDir,
database,