Commit 0a957243 authored by Shubham Aggarwal's avatar Shubham Aggarwal Committed by Commit Bot

Wait for QuicServer to process all requests before checking for errors.

The test referred to in the bug below has been flaky on multiple
platforms: iOS(1032568) and FuchsiaOS(813631) as well as Win 7 and
MacOS on Edge. This PR includes a short change which should fix this.

It seems like the QuicServer running asynchronously hasn't had time to
process all requests which is causing a race condition when the check
in line 421 is made. So we wait until the server is finished processing
the requests before making the expect check.

Bug: 1032568
Change-Id: I52dc909b7167d811126fab99cf2b7ad334b2d96e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2008627Reviewed-by: default avatarZhongyi Shi <zhongyi@chromium.org>
Commit-Queue: Zhongyi Shi <zhongyi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736150}
parent 7d67cae3
......@@ -417,6 +417,10 @@ TEST_P(URLRequestQuicTest, CancelPushIfCached_SomeCached) {
#if !defined(OS_FUCHSIA) && !defined(OS_IOS)
// TODO(crbug.com/813631): Make this work on Fuchsia.
// TODO(crbug.com/1032568): Make this work on iOS.
// Wait until the server has processed all errors which is
// happening asynchronously
base::RunLoop().RunUntilIdle();
// Verify the reset error count received on the server side.
EXPECT_LE(1u, GetRstErrorCountReceivedByServer(quic::QUIC_STREAM_CANCELLED));
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment