Skip to content

Commit

Permalink
buffer filter: Deflake RouterRequestPopulateContentLength (#7885)
Browse files Browse the repository at this point in the history
Signed-off-by: Ruslan Nigmatullin <[email protected]>
  • Loading branch information
Ruslan Nigmatullin authored and mattklein123 committed Aug 9, 2019
1 parent 05e3f6e commit 26a1346
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ TEST_P(BufferIntegrationTest, RouterRequestPopulateContentLength) {

ASSERT_TRUE(fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_));
ASSERT_TRUE(fake_upstream_connection_->waitForNewStream(*dispatcher_, upstream_request_));
upstream_request_->encodeHeaders(default_response_headers_, true);
ASSERT_TRUE(upstream_request_->waitForEndStream(*dispatcher_));

auto* content_length = upstream_request_->headers().ContentLength();
ASSERT_NE(content_length, nullptr);
EXPECT_EQ(content_length->value().getStringView(), "9");

response->waitForEndStream();
ASSERT_TRUE(response->complete());
EXPECT_EQ("200", response->headers().Status()->value().getStringView());
}

TEST_P(BufferIntegrationTest, RouterRequestBufferLimitExceeded) {
Expand Down

0 comments on commit 26a1346

Please sign in to comment.