demery-pivotal commented on a change in pull request #6790:
URL: https://github.com/apache/geode/pull/6790#discussion_r695025989



##########
File path: 
geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/test/dunit/rules/RedisClusterStartupRule.java
##########
@@ -83,8 +84,9 @@ public MemberVM startRedisVM(int index, 
SerializableFunction<ServerStarterRule>
   }
 
   private ServerStarterRule withRedis(ServerStarterRule rule) {
+    int randomPort = AvailablePortHelper.getRandomAvailableTCPPort();
     return rule.withProperty(REDIS_BIND_ADDRESS, BIND_ADDRESS)
-        .withProperty(REDIS_PORT, "0")
+        .withProperty(REDIS_PORT, String.valueOf(randomPort))

Review comment:
       Consider this to eliminate a bit of duplication:
   ```
   return withRedis(rule, String.valueOf(randomPort))
   ```




-- 
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]


Reply via email to