From c23ab607c057b897461dbcc4e840587d7b4b8746 Mon Sep 17 00:00:00 2001 From: alyssawilk Date: Tue, 9 Jun 2020 13:42:25 -0400 Subject: [PATCH] test: fixing flake. (#11507) This is one of those cases where we actually want delay-close: we are doing a large upload, Enovy sends a response, and we want to make sure the socket stays open long enough the response is received rather than short delay-close causing a connection reset during upload Risk Level: n/a (test only) Testing: indeed Docs Changes: n/a Release Notes: n/a Signed-off-by: Alyssa Wilk Signed-off-by: yashwant121 --- .../filters/http/buffer/buffer_filter_integration_test.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/extensions/filters/http/buffer/buffer_filter_integration_test.cc b/test/extensions/filters/http/buffer/buffer_filter_integration_test.cc index e899205bd6b9..c61b6e175368 100644 --- a/test/extensions/filters/http/buffer/buffer_filter_integration_test.cc +++ b/test/extensions/filters/http/buffer/buffer_filter_integration_test.cc @@ -96,6 +96,13 @@ TEST_P(BufferIntegrationTest, RouterRequestPopulateContentLengthOnTrailers) { } TEST_P(BufferIntegrationTest, RouterRequestBufferLimitExceeded) { + // Make sure the connection isn't closed during request upload. + // Without a large drain-close it's possible that the local reply will be sent + // during request upload, and continued upload will result in TCP reset before + // the response is read. + config_helper_.addConfigModifier( + [](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& + hcm) { hcm.mutable_delayed_close_timeout()->set_seconds(2000 * 1000); }); config_helper_.addFilter(ConfigHelper::smallBufferFilter()); initialize();