Skip to content

Commit

Permalink
JedisMock cannot be cast to DynoJedisClient
Browse files Browse the repository at this point in the history
Tests fail without this fix.
  • Loading branch information
smukil committed Jan 17, 2020
1 parent 12d242a commit ee40066
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ public RedisQueues(Clock clock, JedisCommands quorumConn, JedisCommands nonQuoru
this.unackHandlerIntervalInMS = unackHandlerIntervalInMS;
this.queues = new ConcurrentHashMap<>();
this.shardingStrategy = shardingStrategy;
this.singleRingTopology = ((DynoJedisClient) quorumConn).getConnPool().getPools().size() == 3;

if (quorumConn instanceof DynoJedisClient) {
this.singleRingTopology = ((DynoJedisClient) quorumConn).getConnPool().getPools().size() == 3;
} else {
this.singleRingTopology = false;
}
}

/**
Expand Down

0 comments on commit ee40066

Please sign in to comment.