echauchot commented on a change in pull request #11578:
URL: https://github.com/apache/beam/pull/11578#discussion_r419273767
##########
File path:
sdks/java/io/cassandra/src/test/java/org/apache/beam/sdk/io/cassandra/CassandraIOTest.java
##########
@@ -153,18 +153,22 @@ public static void beforeClass() throws Exception {
private static Cluster buildCluster(CassandraEmbeddedServerBuilder builder) {
int tried = 0;
- while (tried < 3) {
+ int delay = 5000;
+ while (tried < 5) {
try {
return builder.buildNativeCluster();
} catch (NoHostAvailableException e) {
tried++;
try {
- Thread.sleep(1000L);
+ Thread.sleep(delay);
} catch (InterruptedException e1) {
}
}
}
- throw new RuntimeException("Unable to create embedded Cassandra cluster");
+ throw new RuntimeException(
+ String.format(
+ "Unable to create embedded Cassandra cluster: tried %d times with
%d delay",
+ tried, delay));
Review comment:
+1 thanks for the suggestion !
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]