You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require(config.shards.all { it.replicas >0 }) { "Replicas for all shards must be greater than 0" }
48
53
require(config.ports.isEmpty() || config.ports.size == config.shards.sumOf { it.replicas +1 }) { "If ports are specified, they must match the number of nodes" }
49
-
require(config.ports.all { it inVALID_PORT_RANGE }) { "All ports must be in range $VALID_PORT_RANGE" }
54
+
require(config.ports.all { it invalidPortRange }) { "All ports must be in range $validPortRange" }
50
55
require(config.initializationTimeout >0) { "Initialization timeout must be greater than 0" }
51
56
validateCustomizers(config.customizer)
52
57
}
@@ -59,7 +64,11 @@ internal class RedisValidationExtension : BeforeAllCallback {
Copy file name to clipboardExpand all lines: src/main/kotlin/io/github/tobi/laa/spring/boot/embedded/redis/server/RedisServerContextCustomizerFactory.kt
Copy file name to clipboardExpand all lines: src/main/kotlin/io/github/tobi/laa/spring/boot/embedded/redis/shardedcluster/RedisShardedClusterContextCustomizer.kt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -60,10 +60,10 @@ internal class RedisShardedClusterContextCustomizer(
60
60
61
61
privatefunports(): List<Int> {
62
62
returnif (config.ports.isEmpty()) {
63
-
val nOfNodes = config.shards.map { it.replicas +1 }.sum()
63
+
val nOfNodes = config.shards.sumOf { it.replicas +1 }
Copy file name to clipboardExpand all lines: src/main/kotlin/io/github/tobi/laa/spring/boot/embedded/redis/shardedcluster/RedisShardedClusterContextCustomizerFactory.kt
0 commit comments