Skip to content

Commit

Permalink
test: fix flake in access_log_integration_test. (#2486)
Browse files Browse the repository at this point in the history
Failed to update the stats check for this test in #2481.

In general, we should get better at abstracting away these gRPC client type dependent stats in
integration tests, but we should merge this PR to reduce CI flakes first.

Risk Level: Low
Testing: 100 runs of the test with -c dbg.

Signed-off-by: Harvey Tuch <[email protected]>
  • Loading branch information
htuch authored and mattklein123 committed Jan 31, 2018
1 parent 4d689ef commit c360fad
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/integration/access_log_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,16 @@ TEST_P(AccessLogIntegrationTest, BasicAccessLogFlow) {
envoy::service::accesslog::v2::StreamAccessLogsResponse response_msg;
access_log_request_->sendGrpcMessage(response_msg);
access_log_request_->finishGrpcStream(Grpc::Status::Ok);
test_server_->waitForGaugeEq("cluster.accesslog.upstream_rq_active", 0);

switch (clientType()) {
case Grpc::ClientType::EnvoyGrpc:
test_server_->waitForGaugeEq("cluster.accesslog.upstream_rq_active", 0);
break;
case Grpc::ClientType::GoogleGrpc:
test_server_->waitForCounterGe("grpc.accesslog.streams_closed_0", 1);
break;
default:
NOT_REACHED;
}
response = IntegrationUtil::makeSingleRequest(lookupPort("http"), "GET", "/notfound", "",
downstream_protocol_, version_);
EXPECT_TRUE(response->complete());
Expand Down

0 comments on commit c360fad

Please sign in to comment.