Skip to content

test: fix ratelimit_integration_test flake introduced in #2434.#2443

Merged
htuch merged 1 commit intoenvoyproxy:masterfrom
htuch:fix-ratelimit-flake
Jan 24, 2018
Merged

test: fix ratelimit_integration_test flake introduced in #2434.#2443
htuch merged 1 commit intoenvoyproxy:masterfrom
htuch:fix-ratelimit-flake

Conversation

@htuch
Copy link
Copy Markdown
Member

@htuch htuch commented Jan 24, 2018

Signed-off-by: Harvey Tuch htuch@google.com

.

Signed-off-by: Harvey Tuch <htuch@google.com>
switch (clientType()) {
case Grpc::ClientType::EnvoyGrpc:
test_server_->waitForCounterGe("cluster.ratelimit.upstream_rq_timeout", 1);
test_server_->waitForCounterGe("cluster.ratelimit.upstream_rq_504", 1);
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.

Just curious, why do we not need to wait on streams_total to be incremented below, too?

Copy link
Copy Markdown
Member Author

@htuch htuch Jan 24, 2018

Choose a reason for hiding this comment

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

The Google gRPC client increments streams_total when .streams come to life and then increments streams_closed_<grpc status code> when they close. So, it's sufficient to wait on the close. For Envoy gRPC, it appears that rq_timeout is bumped before rq_504. Could have just waiting on rq_504 I suppose, but belts-and-braces.

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.

Gotcha. Makes sense. It probably makes sense to not depend on implementation defined order of modification for timeout and 504 anyway.

@htuch htuch merged commit 3d0fd49 into envoyproxy:master Jan 24, 2018
@htuch htuch deleted the fix-ratelimit-flake branch January 24, 2018 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants