@@ -961,14 +961,7 @@ public class LettuceConnection extends AbstractRedisConnection {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected StatefulConnection<byte[], byte[]> doGetAsyncDedicatedConnection() {
|
||||
|
||||
StatefulConnection<byte[], byte[]> connection = getConnectionProvider().getConnection(StatefulConnection.class);
|
||||
|
||||
if (customizedDatabaseIndex()) {
|
||||
potentiallySelectDatabase(connection, this.dbIndex);
|
||||
}
|
||||
|
||||
return connection;
|
||||
return getConnectionProvider().getConnection(StatefulConnection.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,6 +25,7 @@ import static org.mockito.Mockito.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import io.lettuce.core.KeyScanCursor;
|
||||
@@ -188,7 +189,7 @@ class LettuceConnectionUnitTests {
|
||||
connection.getNativeConnection();
|
||||
|
||||
verify(asyncCommandsMock).dispatch(eq(CommandType.SELECT), any(), any());
|
||||
verify(commandsMock).select(1);
|
||||
verifyNoInteractions(commandsMock);
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-603
|
||||
|
||||
Reference in New Issue
Block a user