improve flaky integration test