Skip to content

Commit

Permalink
fix test for oldest grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolduc committed Aug 25, 2022
1 parent a57d756 commit 7af728d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "google/cloud/bigtable/internal/bigtable_channel_refresh.h"
#include "google/cloud/bigtable/internal/bigtable_stub_factory.h"
#include "google/cloud/bigtable/options.h"
#include "google/cloud/credentials.h"
#include "google/cloud/grpc_options.h"
#include "google/cloud/testing_util/mock_completion_queue_impl.h"
#include <gmock/gmock.h>
Expand Down Expand Up @@ -96,11 +97,9 @@ TEST(BigtableChannelRefresh, Continuations) {
// Mock the call to `CQ::AsyncWaitConnectionReady()`
EXPECT_CALL(*mock_cq, StartOperation)
.WillOnce([](std::shared_ptr<internal::AsyncGrpcOperation> const& op,
absl::FunctionRef<void(void*)> call) {
void* tag = op.get();
absl::FunctionRef<void(void*)>) {
// False means no state change in the underlying gRPC channel
op->Notify(false);
call(tag);
});
// We should schedule another channel refresh.
EXPECT_CALL(*mock_cq, MakeRelativeTimer)
Expand All @@ -117,6 +116,7 @@ TEST(BigtableChannelRefresh, Continuations) {
CompletionQueue cq(mock_cq);
auto stub = CreateBigtableStub(
cq, Options{}
.set<UnifiedCredentialsOption>(MakeInsecureCredentials())
.set<GrpcNumChannelsOption>(1)
.set<bigtable::MinConnectionRefreshOption>(ms(500))
.set<bigtable::MaxConnectionRefreshOption>(ms(1000)));
Expand Down

0 comments on commit 7af728d

Please sign in to comment.