Skip to content

Commit

Permalink
mobile: Fix flaky ClientIntegrationTest (envoyproxy#36077)
Browse files Browse the repository at this point in the history
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
envoyproxy#34252. See also
envoyproxy/envoy-mobile#1393.

Fixes envoyproxy#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 <[email protected]>
  • Loading branch information
fredyw authored Sep 12, 2024
1 parent 1eedeee commit 1b38e93
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions mobile/test/common/integration/client_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_++;
};

Expand Down

0 comments on commit 1b38e93

Please sign in to comment.