Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation in http_integration.cc #8896

Merged
merged 2 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/integration/http_integration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void HttpIntegrationTest::verifyResponse(IntegrationStreamDecoderPtr response,
uint64_t
HttpIntegrationTest::waitForNextUpstreamRequest(const std::vector<uint64_t>& upstream_indices,
std::chrono::milliseconds connection_wait_timeout) {
uint64_t upstream_with_request;
uint64_t upstream_with_request = fake_upstreams_.size();
// If there is no upstream connection, wait for it to be established.
if (!fake_upstream_connection_) {

Expand Down
1 change: 1 addition & 0 deletions test/integration/protocol_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ TEST_P(DownstreamProtocolIntegrationTest, RetryHostPredicateFilter) {

// Note how we're expecting each upstream request to hit the same upstream.
auto upstream_idx = waitForNextUpstreamRequest({0, 1});
ASSERT_LT(upstream_idx, fake_upstreams_.size());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the only place where the return value was used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead can you have it return an absl::optional? That is more future proof IMO.

upstream_request_->encodeHeaders(Http::TestHeaderMapImpl{{":status", "503"}}, false);

if (fake_upstreams_[upstream_idx]->httpType() == FakeHttpConnection::Type::HTTP1) {
Expand Down