From f76c297e3ba1070cd1f9ab6d3c5b1f8a345fa9a0 Mon Sep 17 00:00:00 2001 From: Michael Puncel Date: Thu, 18 Apr 2019 15:44:46 -0400 Subject: [PATCH 1/2] http timeout integration test: wait for 10ms for upstream reset This test waits for the upstream to see a reset which confirms that the router filter did the right thing when the global timeout is hit. However since this involves the network, we would occasionally see the reset after the wait call. Since we were waiting for 0ms we'd get flakes. 10ms is hopefully high enough that the test will succeed reliably. Signed-off-by: Michael Puncel --- test/integration/http_timeout_integration_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/http_timeout_integration_test.cc b/test/integration/http_timeout_integration_test.cc index 00b0f4c65ea8a..e49e106187684 100644 --- a/test/integration/http_timeout_integration_test.cc +++ b/test/integration/http_timeout_integration_test.cc @@ -36,7 +36,7 @@ TEST_P(HttpTimeoutIntegrationTest, GlobalTimeout) { // Ensure we got a timeout downstream and canceled the upstream request. response->waitForHeaders(); - ASSERT_TRUE(upstream_request_->waitForReset(std::chrono::milliseconds(0))); + ASSERT_TRUE(upstream_request_->waitForReset(std::chrono::milliseconds(10))); codec_client_->close(); From b618070770be76f1f5630b79a49cfbcc1e89dcbc Mon Sep 17 00:00:00 2001 From: Michael Puncel Date: Thu, 18 Apr 2019 21:10:00 -0400 Subject: [PATCH 2/2] increase timeout to 15s Signed-off-by: Michael Puncel --- test/integration/http_timeout_integration_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/http_timeout_integration_test.cc b/test/integration/http_timeout_integration_test.cc index e49e106187684..11539865ffc6a 100644 --- a/test/integration/http_timeout_integration_test.cc +++ b/test/integration/http_timeout_integration_test.cc @@ -36,7 +36,7 @@ TEST_P(HttpTimeoutIntegrationTest, GlobalTimeout) { // Ensure we got a timeout downstream and canceled the upstream request. response->waitForHeaders(); - ASSERT_TRUE(upstream_request_->waitForReset(std::chrono::milliseconds(10))); + ASSERT_TRUE(upstream_request_->waitForReset(std::chrono::seconds(15))); codec_client_->close();