Skip to content

Commit

Permalink
redis: fix merge race (#7943)
Browse files Browse the repository at this point in the history
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
  • Loading branch information
lizan authored and mattklein123 committed Aug 16, 2019
1 parent b9fe0b9 commit 5a7bab7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/extensions/clusters/redis/redis_cluster_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ class RedisClusterTest : public testing::Test,

// No change.
expectRedisResolve();
resolve_timer_->callback_();
resolve_timer_->invokeCallback();
EXPECT_CALL(*cluster_callback_, onClusterSlotUpdate(_, _)).Times(1).WillOnce(Return(false));
expectClusterSlotResponse(twoSlotsMastersWithReplica());
expectHealthyHosts(std::list<std::string>(
Expand All @@ -482,7 +482,7 @@ class RedisClusterTest : public testing::Test,
// Remove 2nd shard.
expectRedisResolve();
EXPECT_CALL(membership_updated_, ready());
resolve_timer_->callback_();
resolve_timer_->invokeCallback();
EXPECT_CALL(*cluster_callback_, onClusterSlotUpdate(_, _)).Times(1);
expectClusterSlotResponse(singleSlotMasterReplica("127.0.0.1", "127.0.0.2", 22120));
expectHealthyHosts(std::list<std::string>({"127.0.0.1:22120", "127.0.0.2:22120"}));
Expand Down Expand Up @@ -819,7 +819,7 @@ TEST_F(RedisClusterTest, RedisReplicaErrorResponse) {
for (uint64_t i = 1; i < (1 << 3); i++) {
std::bitset<3> replica_flags(i);
expectRedisResolve();
resolve_timer_->callback_();
resolve_timer_->invokeCallback();
if (replica_flags.all()) {
EXPECT_CALL(membership_updated_, ready());
EXPECT_CALL(*cluster_callback_, onClusterSlotUpdate(_, _)).Times(1).WillOnce(Return(false));
Expand Down

0 comments on commit 5a7bab7

Please sign in to comment.