On my system there needs to be a slight pause between stopping and checking to see if SwiftAIO has stopped. Without the pause the tests fail for a non-obvious reason. Instead of using a magic sleep, re-use the retry logic that is used for starting the test server.