Skip to content

Commit

Permalink
generic proxy: fix test in debug mode (#30632)
Browse files Browse the repository at this point in the history
Signed-off-by: wbpcode <wbphub@live.com>
  • Loading branch information
code authored Oct 31, 2023
1 parent 03fdc59 commit 9fb9844
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions contrib/generic_proxy/filters/network/source/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,6 @@ envoy_cc_library(
":file_access_log_lib",
"//contrib/generic_proxy/filters/network/source/interface:stream_interface",
],
# Ensure this factory in the source is always linked in.
alwayslink = 1,
)
4 changes: 2 additions & 2 deletions contrib/generic_proxy/filters/network/test/proxy_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,6 @@ TEST_F(FilterTest, NewStreamAndReplyNormallyWithMultipleFrames) {
EXPECT_EQ(1, filter_->activeStreamsForTest().size());
EXPECT_EQ(0, filter_->frameHandlersForTest().size());

std::cout << "OK decoding" << std::endl;

auto active_stream = filter_->activeStreamsForTest().begin()->get();

EXPECT_CALL(
Expand Down Expand Up @@ -913,6 +911,8 @@ TEST_F(FilterTest, TestStats) {
auto active_stream = filter_->activeStreamsForTest().begin()->get();
Buffer::OwnedImpl buffer;
buffer.add("123");
// Mock response.
active_stream->onResponseStart(std::make_unique<FakeStreamCodecFactory::FakeResponse>());
active_stream->onEncodingSuccess(buffer, true);
EXPECT_EQ(1, filter_config_->stats().response_.value());
EXPECT_EQ(0, filter_config_->stats().request_active_.value());
Expand Down
2 changes: 2 additions & 0 deletions source/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -619,4 +619,6 @@ envoy_cc_library(
"//source/common/network:resolver_lib",
"@envoy_api//envoy/config/upstream/local_address_selector/v3:pkg_cc_proto",
],
# Ensure this factory in the source is always linked in.
alwayslink = 1,
)

0 comments on commit 9fb9844

Please sign in to comment.