echauchot commented on code in PR #37: URL: https://github.com/apache/flink-connector-cassandra/pull/37#discussion_r2329753480
########## 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: This works and seems to be quicker by 15% (out of 4 runs) -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org