Skip to content

Commit

Permalink
fix thrift ratelimit
Browse files Browse the repository at this point in the history
Signed-off-by: wangbaiping(wbpcode) <[email protected]>
  • Loading branch information
wbpcode committed Dec 11, 2024
1 parent d3f28fd commit 8c523e5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ThriftRateLimitFilterTest : public testing::Test {
NiceMock<Runtime::MockLoader> runtime_;
NiceMock<Upstream::MockClusterManager> cm_;
NiceMock<ThriftProxy::Router::MockRateLimitPolicyEntry> route_rate_limit_;
std::vector<RateLimit::Descriptor> descriptor_{{{{"descriptor_key", "descriptor_value"}}}};
std::vector<RateLimit::Descriptor> descriptor_{{{{{"descriptor_key", "descriptor_value"}}}}};
NiceMock<LocalInfo::MockLocalInfo> local_info_;
};

Expand Down Expand Up @@ -211,7 +211,7 @@ TEST_F(ThriftRateLimitFilterTest, OkResponse) {

EXPECT_CALL(*client_, limit(_, "foo",
testing::ContainerEq(std::vector<RateLimit::Descriptor>{
{{{"descriptor_key", "descriptor_value"}}}}),
{{{{"descriptor_key", "descriptor_value"}}}}}),
_, _, 0))
.WillOnce(
WithArgs<0>(Invoke([&](Filters::Common::RateLimit::RequestCallbacks& callbacks) -> void {
Expand Down Expand Up @@ -242,7 +242,7 @@ TEST_F(ThriftRateLimitFilterTest, ImmediateOkResponse) {

EXPECT_CALL(*client_, limit(_, "foo",
testing::ContainerEq(std::vector<RateLimit::Descriptor>{
{{{"descriptor_key", "descriptor_value"}}}}),
{{{{"descriptor_key", "descriptor_value"}}}}}),
_, _, 0))
.WillOnce(
WithArgs<0>(Invoke([&](Filters::Common::RateLimit::RequestCallbacks& callbacks) -> void {
Expand All @@ -266,7 +266,7 @@ TEST_F(ThriftRateLimitFilterTest, ImmediateErrorResponse) {

EXPECT_CALL(*client_, limit(_, "foo",
testing::ContainerEq(std::vector<RateLimit::Descriptor>{
{{{"descriptor_key", "descriptor_value"}}}}),
{{{{"descriptor_key", "descriptor_value"}}}}}),
_, _, 0))
.WillOnce(
WithArgs<0>(Invoke([&](Filters::Common::RateLimit::RequestCallbacks& callbacks) -> void {
Expand Down

0 comments on commit 8c523e5

Please sign in to comment.