-
Notifications
You must be signed in to change notification settings - Fork 5.5k
circuit breaker: track remaining resource count #6269
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
Changes from 5 commits
681b177
af44636
708e6e4
b7592b6
b29f4a0
337f335
d29d7b1
28f47d5
e9c8b5b
741295d
40fa909
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |
| #include "test/mocks/upstream/mocks.h" | ||
| #include "test/test_common/printers.h" | ||
|
|
||
| #include "absl/strings/match.h" | ||
| #include "gmock/gmock.h" | ||
| #include "gtest/gtest.h" | ||
|
|
||
|
|
@@ -52,9 +53,12 @@ class RedisClientImplTest : public testing::Test, public Common::Redis::DecoderF | |
| ~RedisClientImplTest() { | ||
| client_.reset(); | ||
|
|
||
| // Make sure all gauges are 0. | ||
| // Make sure all gauges are 0, except those in circuit_breakers which default | ||
| // to the resource max. | ||
| for (const Stats::GaugeSharedPtr& gauge : host_->cluster_.stats_store_.gauges()) { | ||
| EXPECT_EQ(0U, gauge->value()); | ||
| if (!absl::StrContains(gauge->name(), "circuit_breakers")) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this whitelisting is fine, thought it might make sense at one point to add a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will defer to your (or anyone else's) judgment on whether or not to make that change here. It makes sense to me. |
||
| EXPECT_EQ(0U, gauge->value()); | ||
| } | ||
| } | ||
| for (const Stats::GaugeSharedPtr& gauge : host_->stats_store_.gauges()) { | ||
| EXPECT_EQ(0U, gauge->value()); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.