echauchot commented on code in PR #37:
URL: 
https://github.com/apache/flink-connector-cassandra/pull/37#discussion_r2329539132


##########
flink-connector-cassandra/src/test/java/org/apache/flink/connector/cassandra/CassandraTestEnvironment.java:
##########
@@ -118,39 +139,46 @@ public void tearDown() throws Exception {
         stopEnv();
     }
 
-    private static void addJavaOpts(GenericContainer<?> container, String... 
opts) {
-        String jvmOpts = container.getEnvMap().getOrDefault("JVM_OPTS", "");
-        container.withEnv("JVM_OPTS", jvmOpts + " " + StringUtils.join(opts, " 
"));
-    }
-
     private void startEnv() throws Exception {
         // configure container start to wait until cassandra is ready to 
receive queries
-        cassandraContainer.waitingFor(new CassandraQueryWaitStrategy());
         // start with retrials
-        cassandraContainer.start();
-        cassandraContainer.followOutput(
+        cassandraContainer1.waitingFor(
+                Wait.forLogMessage(".*Startup complete.*", 1)
+                        .withStartupTimeout(Duration.ofMinutes(2)));
+        cassandraContainer1.start();
+        cassandraContainer1.followOutput(
                 new Slf4jLogConsumer(LOG),
                 OutputFrame.OutputType.END,
                 OutputFrame.OutputType.STDERR,
                 OutputFrame.OutputType.STDOUT);
 
-        cluster = cassandraContainer.getCluster();
+        cassandraContainer2.waitingFor(
+                Wait.forLogMessage(".*Startup complete.*", 1)
+                        .withStartupTimeout(Duration.ofMinutes(2)));
+        cassandraContainer2.start();

Review Comment:
   I did not know that. Thanks for the pointer ! The advantage I see is the 
reduction on the startup time by running the 2 containers in parallel. I'll try 
this out.



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