Commit 3da795c1 authored by Robbie McElrath's avatar Robbie McElrath Committed by Commit Bot

Fix flaky FeedbackUploaderDispatchTest

One of the tests starts a request that will repeatedly retry itself on
failures, with backoff. The test asserts that the delay has a certain
value, which is effectively the same as asserting that the request is
on a certain retry attempt, but sometimes the request has time to retry
more than once before the test assertion occurs. This changes to assert
to not expect a specific value, just one that's larger than the
default.

Bug: 864797
Change-Id: Ia8fced88b119f724bb2e2c93602ed6034b0b87d1
Reviewed-on: https://chromium-review.googlesource.com/1141299Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576131}
parent c3189977
......@@ -156,14 +156,7 @@ TEST_F(FeedbackUploaderDispatchTest, 400Response) {
EXPECT_TRUE(uploader.QueueEmpty());
}
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
// Flaky. crbug.com/864797
#define MAYBE_500Response DISABLED_500Response
#else
#define MAYBE_500Response 500Response
#endif
TEST_F(FeedbackUploaderDispatchTest, MAYBE_500Response) {
TEST_F(FeedbackUploaderDispatchTest, 500Response) {
FeedbackUploader::SetMinimumRetryDelayForTesting(kTestRetryDelay);
FeedbackUploader uploader(
shared_url_loader_factory(), context(),
......@@ -181,7 +174,7 @@ TEST_F(FeedbackUploaderDispatchTest, MAYBE_500Response) {
QueueReport(&uploader, "Server error failed report");
base::RunLoop().RunUntilIdle();
EXPECT_EQ(kTestRetryDelay * 2, uploader.retry_delay());
EXPECT_LT(kTestRetryDelay, uploader.retry_delay());
EXPECT_FALSE(uploader.QueueEmpty());
}
......
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