use of io.lettuce.core.ReadFrom in project lettuce-core by lettuce-io.
the class MasterSlaveTest method noSlaveForRead.
@Test
void noSlaveForRead() {
connection.setReadFrom(new ReadFrom() {
@Override
public List<RedisNodeDescription> select(Nodes nodes) {
return Collections.emptyList();
}
});
assertThatThrownBy(() -> slaveCall(connection)).isInstanceOf(RedisException.class);
}
Aggregations