You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/08 08:51:23 UTC

[GitHub] [flink-connector-elasticsearch] dingweiqings opened a new pull request, #48: [FLINK-28177] for test containers add elasticsearch service really up check

dingweiqings opened a new pull request, #48:
URL: https://github.com/apache/flink-connector-elasticsearch/pull/48

   ## Description
   I found elasticsearch service in testcontainers may start up slower than  test case  leading to failure test.
   ## How to fix
   Add a service  check strategy , which is http respose check for elasticsearch. 


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-elasticsearch] boring-cyborg[bot] commented on pull request #48: [FLINK-28177] for test containers add elasticsearch service really up check

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on PR #48:
URL: https://github.com/apache/flink-connector-elasticsearch/pull/48#issuecomment-1361010492

   Awesome work, congrats on your first merged pull request!
   


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-elasticsearch] boring-cyborg[bot] commented on pull request #48: [FLINK-28177] for test containers add elasticsearch service really up check

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on PR #48:
URL: https://github.com/apache/flink-connector-elasticsearch/pull/48#issuecomment-1342285829

   Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)
   


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-elasticsearch] dingweiqings commented on a diff in pull request #48: [FLINK-28177] for test containers add elasticsearch service really up check

Posted by GitBox <gi...@apache.org>.
dingweiqings commented on code in PR #48:
URL: https://github.com/apache/flink-connector-elasticsearch/pull/48#discussion_r1054014813


##########
flink-connector-elasticsearch6/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/table/Elasticsearch6DynamicSinkITCase.java:
##########
@@ -65,13 +65,20 @@
 import static org.apache.flink.streaming.connectors.elasticsearch.table.TestContext.context;
 import static org.apache.flink.table.api.Expressions.row;
 import static org.assertj.core.api.Assertions.assertThat;
+import static org.testcontainers.containers.wait.strategy.Wait.forHttp;
 
 /** IT tests for {@link Elasticsearch6DynamicSink}. */
 public class Elasticsearch6DynamicSinkITCase extends TestLogger {
 
     @ClassRule
     public static ElasticsearchContainer elasticsearchContainer =
-            new ElasticsearchContainer(DockerImageName.parse(DockerImageVersions.ELASTICSEARCH_6));
+            new ElasticsearchContainer(DockerImageName.parse(DockerImageVersions.ELASTICSEARCH_6))
+                    .waitingFor(
+                            forHttp("/")
+                                    .withMethod("HEAD")
+                                    .forStatusCode(200)
+                                    .forPort(9200)
+                                    .withStartupTimeout(Duration.ofMinutes(5)));

Review Comment:
   Updated. 



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-elasticsearch] MartijnVisser commented on a diff in pull request #48: [FLINK-28177] for test containers add elasticsearch service really up check

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #48:
URL: https://github.com/apache/flink-connector-elasticsearch/pull/48#discussion_r1053381784


##########
flink-connector-elasticsearch6/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/table/Elasticsearch6DynamicSinkITCase.java:
##########
@@ -65,13 +65,20 @@
 import static org.apache.flink.streaming.connectors.elasticsearch.table.TestContext.context;
 import static org.apache.flink.table.api.Expressions.row;
 import static org.assertj.core.api.Assertions.assertThat;
+import static org.testcontainers.containers.wait.strategy.Wait.forHttp;
 
 /** IT tests for {@link Elasticsearch6DynamicSink}. */
 public class Elasticsearch6DynamicSinkITCase extends TestLogger {
 
     @ClassRule
     public static ElasticsearchContainer elasticsearchContainer =
-            new ElasticsearchContainer(DockerImageName.parse(DockerImageVersions.ELASTICSEARCH_6));
+            new ElasticsearchContainer(DockerImageName.parse(DockerImageVersions.ELASTICSEARCH_6))
+                    .waitingFor(
+                            forHttp("/")
+                                    .withMethod("HEAD")
+                                    .forStatusCode(200)
+                                    .forPort(9200)
+                                    .withStartupTimeout(Duration.ofMinutes(5)));

Review Comment:
   Can you please set this to two minutes, like we've also done for other tests?



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-elasticsearch] MartijnVisser merged pull request #48: [FLINK-28177] for test containers add elasticsearch service really up check

Posted by GitBox <gi...@apache.org>.
MartijnVisser merged PR #48:
URL: https://github.com/apache/flink-connector-elasticsearch/pull/48


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org