vttranlina commented on code in PR #2362:
URL: https://github.com/apache/james-project/pull/2362#discussion_r1690723775
##########
backends-common/redis/src/test/java/org/apache/james/backends/redis/RedisConfigurationTest.scala:
##########
@@ -88,4 +88,32 @@ class RedisConfigurationTest extends AnyFlatSpec with
Matchers {
RedisConfiguration.from(config)
}
}
+
+ it should "parse redisURL when multiple sentinel endpoint" in {
+ val config = new PropertiesConfiguration()
+ config.setListDelimiterHandler(new DefaultListDelimiterHandler(','))
+ config.addProperty("redisURL",
"redis-sentinel://secret1@redis-sentinel-1:26379,redis-sentinel-2:26379,redis-sentinel-3:26379?sentinelMasterId=mymaster")
+ config.addProperty("redis.topology", "master-replica")
+
+ val redisConfig: RedisConfiguration = RedisConfiguration.from(config)
+ redisConfig.isInstanceOf[MasterReplicaRedisConfiguration] shouldEqual
(true)
+ val redisMasterReplicaRedisConfiguration =
redisConfig.asInstanceOf[MasterReplicaRedisConfiguration]
+
+ redisMasterReplicaRedisConfiguration.redisURI.value.size shouldEqual 1
+ redisMasterReplicaRedisConfiguration.redisURI.value.head.toString
shouldEqual
"redis-sentinel://*******@redis-sentinel-1,redis-sentinel-2,redis-sentinel-3?sentinelMasterId=mymaster"
Review Comment:
The RedisURI (lettuce library) auto hidden sensitive info
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]