Fix a flaky end-to-end test.