From 1b38e93f420d0935ec384ae55c604b763c10632e Mon Sep 17 00:00:00 2001 From: Fredy Wijaya Date: Thu, 12 Sep 2024 10:24:44 -0500 Subject: [PATCH] mobile: Fix flaky ClientIntegrationTest (#36077) This PR removes the test expectation that the `end_stream` always contains 0 bytes since this behavior is not guaranteed causing test flakiness. This is similar to https://github.com/envoyproxy/envoy/pull/34252. See also https://github.com/envoyproxy/envoy-mobile/issues/1393. Fixes https://github.com/envoyproxy/envoy/issues/36074. Risk Level: low (test only) Testing: `bazel test //test/common/integration:client_integration_test --runs_per_test=200` Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a --------- Signed-off-by: Fredy Wijaya --- mobile/test/common/integration/client_integration_test.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mobile/test/common/integration/client_integration_test.cc b/mobile/test/common/integration/client_integration_test.cc index 4c47ed94cc6a..d428ebf4e888 100644 --- a/mobile/test/common/integration/client_integration_test.cc +++ b/mobile/test/common/integration/client_integration_test.cc @@ -206,13 +206,7 @@ void ClientIntegrationTest::basicTest() { std::to_string(request_data.length())); EnvoyStreamCallbacks stream_callbacks = createDefaultStreamCallbacks(); - stream_callbacks.on_data_ = [this](const Buffer::Instance& buffer, uint64_t length, - bool end_stream, envoy_stream_intel) { - if (end_stream) { - std::string response_body(length, ' '); - buffer.copyOut(0, length, response_body.data()); - EXPECT_EQ(response_body, ""); - } + stream_callbacks.on_data_ = [this](const Buffer::Instance&, uint64_t, bool, envoy_stream_intel) { cc_.on_data_calls_++; };