Skip to content

Commit

Permalink
Fix #12448 Flaky testHoldContent
Browse files Browse the repository at this point in the history
Fixed the HttpTester usage to avoid discarding send response content that arrived with first read
  • Loading branch information
gregw authored and sbordet committed Oct 31, 2024
1 parent b9cdfd3 commit 1e4eb61
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1980,13 +1980,13 @@ public void onClosed(Connection connection)
}
else
{
HttpTester.Response response = HttpTester.parseResponse(client.getInputStream());
HttpTester.Input input = HttpTester.from(client.getInputStream());
HttpTester.Response response = HttpTester.parseResponse(input);
assertNotNull(response);
assertThat(response.getStatus(), is(200));

if (pipeline)
{
response = HttpTester.parseResponse(client.getInputStream());
response = HttpTester.parseResponse(input);
assertNotNull(response);
assertThat(response.getStatus(), is(200));
}
Expand Down

0 comments on commit 1e4eb61

Please sign in to comment.