in tests, stops server at the end