Avoid race condition in integration tests