Skip to content

Commit

Permalink
test: fix http_timeout_integration_test flake (#12654)
Browse files Browse the repository at this point in the history
Fixes #12653

Signed-off-by: Matt Klein <[email protected]>
  • Loading branch information
mattklein123 authored Aug 14, 2020
1 parent 9f95dda commit a2cb83c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/integration/http_timeout_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ TEST_P(HttpTimeoutIntegrationTest, PerTryTimeoutWithoutGlobalTimeout) {
{"x-forwarded-for", "10.0.0.1"},
{"x-envoy-retry-on", "5xx"},
{"x-envoy-upstream-rq-timeout-ms", "0"},
{"x-envoy-upstream-rq-per-try-timeout-ms", "5"}});
{"x-envoy-upstream-rq-per-try-timeout-ms", "50"}});
auto response = std::move(encoder_decoder.second);
request_encoder_ = &encoder_decoder.first;

Expand All @@ -294,11 +294,11 @@ TEST_P(HttpTimeoutIntegrationTest, PerTryTimeoutWithoutGlobalTimeout) {
ASSERT_TRUE(upstream_request_->waitForEndStream(*dispatcher_));

// Trigger per try timeout (but not global timeout) and wait for reset.
timeSystem().advanceTimeWait(std::chrono::milliseconds(5));
timeSystem().advanceTimeWait(std::chrono::milliseconds(50));
ASSERT_TRUE(upstream_request_->waitForReset());

// Wait for a second request to be sent upstream. Max retry backoff is 25ms so advance time that
// much.
// much. This is always less than the next request's per try timeout.
timeSystem().advanceTimeWait(std::chrono::milliseconds(25));
ASSERT_TRUE(fake_upstream_connection_->waitForNewStream(*dispatcher_, upstream_request_));
ASSERT_TRUE(upstream_request_->waitForHeadersComplete());
Expand Down

0 comments on commit a2cb83c

Please sign in to comment.