Skip to content

Commit

Permalink
quic: two minor coverage improvements (envoyproxy#36398)
Browse files Browse the repository at this point in the history
Signed-off-by: Alyssa Wilk <[email protected]>
  • Loading branch information
alyssawilk authored Oct 2, 2024
1 parent 9334be1 commit 9fa36da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions source/common/quic/envoy_quic_client_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ class EnvoyQuicClientSession : public QuicFilterManagerConnectionImpl,

// PacketsToReadDelegate
size_t numPacketsExpectedPerEventLoop() const override {
// Do one round of reading per active stream, or to see if there's a new
// active stream.
// Do one round of reading per active stream, or to see if there's a new active stream.
return std::max<size_t>(1, GetNumActiveStreams()) * Network::NUM_DATAGRAMS_PER_RECEIVE;
}

Expand Down
2 changes: 2 additions & 0 deletions test/common/quic/envoy_quic_client_stream_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ TEST_F(EnvoyQuicClientStreamTest, GetRequestAndHeaderOnlyResponse) {
const auto result = quic_stream_->encodeHeaders(request_headers_, /*end_stream=*/true);
EXPECT_TRUE(result.ok());

quic_stream_->setFlushTimeout(std::chrono::milliseconds(100)); // No-op

EXPECT_CALL(stream_decoder_, decodeHeaders_(_, /*end_stream=*/false))
.WillOnce(Invoke([](const Http::ResponseHeaderMapPtr& headers, bool) {
EXPECT_EQ("200", headers->getStatusValue());
Expand Down

0 comments on commit 9fa36da

Please sign in to comment.