DATAREDIS-676 - Polishing.

Simplify command timeout access. Set disposal state in LettuceClusterConnection only once. Close resources after tests.

Original pull request: #266.
This commit is contained in:
Mark Paluch
2017-08-21 10:07:36 +02:00
parent 7c20dd2f83
commit 9fb2e3181b
3 changed files with 19 additions and 8 deletions

View File

@@ -115,7 +115,6 @@ public class LettuceClusterConnection extends LettuceConnection implements Defau
this.clusterClient = clusterClient;
this.topologyProvider = new LettuceClusterTopologyProvider(clusterClient);
this.clusterCommandExecutor = executor;
this.disposeClusterCommandExecutorOnClose = false;
}
/*

View File

@@ -272,7 +272,7 @@ public class LettuceConnectionFactory
throw new InvalidDataAccessApiUsageException("Cluster is not configured!");
}
return new LettuceClusterConnection((RedisClusterClient) client, Duration.ofMillis(getTimeout()),
return new LettuceClusterConnection((RedisClusterClient) client, clientConfiguration.getCommandTimeout(),
clusterCommandExecutor);
}