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

test: fix ext auth flake #12660

Merged
merged 1 commit into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions test/common/grpc/grpc_client_integration.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class BaseGrpcClientIntegrationParamTest {
void setGrpcService(envoy::config::core::v3::GrpcService& grpc_service,
const std::string& cluster_name,
Network::Address::InstanceConstSharedPtr address) {
// Set a 5 minute timeout to avoid flakes. If this causes a real test timeout the test is
// broken and/or should be using simulated time.
grpc_service.mutable_timeout()->CopyFrom(Protobuf::util::TimeUtil::SecondsToDuration(300));
switch (clientType()) {
case ClientType::EnvoyGrpc:
grpc_service.mutable_envoy_grpc()->set_cluster_name(cluster_name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,10 @@ class ExtAuthzHttpIntegrationTest : public HttpIntegrationTest,
{"x-append-bat", "append-foo"}, {"x-append-bat", "append-bar"}};
EXPECT_THAT(request_nonexisted_headers, Http::IsSubsetOfHeaders(upstream_request_->headers()));

upstream_request_->encodeHeaders(Http::TestResponseHeaderMapImpl{{":status", "200"}}, true);
response_->waitForEndStream();
EXPECT_TRUE(response_->complete());
EXPECT_EQ("200", response_->headers().getStatusValue());

cleanup();
}
Expand All @@ -492,7 +494,7 @@ class ExtAuthzHttpIntegrationTest : public HttpIntegrationTest,
server_uri:
uri: "ext_authz:9000"
cluster: "ext_authz"
timeout: 0.25s
timeout: 300s

authorization_request:
allowed_headers:
Expand Down