Skip to content

Commit

Permalink
til: InvokeWithoutArgs exists
Browse files Browse the repository at this point in the history
  • Loading branch information
alevenberg committed Jan 18, 2024
1 parent 586a3c5 commit 956212b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions google/cloud/pubsub/internal/pull_ack_handler_factory_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ using ::testing::AllOf;
using ::testing::ByMove;
using ::testing::Contains;
using ::testing::ElementsAre;
using ::testing::InvokeWithoutArgs;
using ::testing::IsEmpty;
using ::testing::Property;
using ::testing::Return;
Expand Down Expand Up @@ -73,7 +74,8 @@ TEST(PullAckHandlerTest, AckSimple) {
// Since the lease manager is started in the constructor of the ack handler,
// we need to match the lease manager calls.
EXPECT_CALL(*mock, AsyncModifyAckDeadline(_, _, _))
.WillRepeatedly(Return(make_ready_future(Status{})));
.WillRepeatedly(
InvokeWithoutArgs([]() { return make_ready_future(Status{}); }));

This comment has been minimized.

Copy link
@dbolduc

dbolduc Jan 18, 2024

Member

nit: .WillRepeatedly([] { return make_ready_future(Status{}); }) probably works.

AsyncSequencer<bool> aseq;
auto cq = MakeMockCompletionQueue(aseq);
auto handler =
Expand Down Expand Up @@ -107,7 +109,8 @@ TEST(PullAckHandlerTest, TracingEnabled) {
// Since the lease manager is started in the constructor of the ack handler,
// we need to match the lease manager calls.
EXPECT_CALL(*mock, AsyncModifyAckDeadline(_, _, _))
.WillRepeatedly(Return(make_ready_future(Status{})));
.WillRepeatedly(
InvokeWithoutArgs([]() { return make_ready_future(Status{}); }));
AsyncSequencer<bool> aseq;
auto cq = MakeMockCompletionQueue(aseq);
auto handler =
Expand Down Expand Up @@ -135,7 +138,9 @@ TEST(PullAckHandlerTest, TracingDisabled) {
// Since the lease manager is started in the constructor of the ack handler,
// we need to match the lease manager calls.
EXPECT_CALL(*mock, AsyncModifyAckDeadline(_, _, _))
.WillRepeatedly(Return(make_ready_future(Status{})));
.WillRepeatedly(
InvokeWithoutArgs([]() { return make_ready_future(Status{}); }));

AsyncSequencer<bool> aseq;
auto cq = MakeMockCompletionQueue(aseq);
auto handler =
Expand Down

0 comments on commit 956212b

Please sign in to comment.