Skip to content
Merged
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
6 changes: 6 additions & 0 deletions test/integration/load_stats_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,12 @@ TEST_P(LoadStatsIntegrationTest, LocalityWeighted) {
locality_weighted_lb_ = true;
initialize();

// Debug logs for #6874
std::cerr << "Waiting for load stats stream.\n";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you'll need use std::endl as end of line so it flushes the buffer.

waitForLoadStatsStream();
std::cerr << "Waiting for load stats request.\n";
waitForLoadStatsRequest({});
std::cerr << "Done waiting.\n";
loadstats_stream_->startGrpcStream();

requestLoadStatsResponse({"cluster_0"});
Expand All @@ -473,7 +477,9 @@ TEST_P(LoadStatsIntegrationTest, LocalityWeighted) {
sendAndReceiveUpstream(0);

// Verify we get the expect request distribution.
std::cerr << "Waiting for load stats request 2.\n";
waitForLoadStatsRequest({localityStats("winter", 4, 0, 0), localityStats("dragon", 2, 0, 0)});
std::cerr << "Done waiting.\n";

EXPECT_EQ(1, test_server_->counter("load_reporter.requests")->value());
// On slow machines, more than one load stats response may be pushed while we are simulating load.
Expand Down