Skip to content

Commit

Permalink
[FLINK-16186][es][tests] Reduce connect timeout to 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Feb 21, 2020
1 parent 326b482 commit 9511243
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public void runInvalidElasticsearchClusterTest() throws Exception {
try {
env.execute("Elasticsearch Sink Test");
} catch (JobExecutionException expectedException) {
// every ES version throws a different exception in case of timeouts, so don't bother asserting on the exception
// test passes
return;
}
Expand All @@ -201,6 +202,7 @@ protected Map<String, String> createUserConfig(int bulkFlushMaxActions, String c
Map<String, String> userConfig = new HashMap<>();
userConfig.put("cluster.name", clusterName);
userConfig.put(ElasticsearchSinkBase.CONFIG_KEY_BULK_FLUSH_MAX_ACTIONS, String.valueOf(bulkFlushMaxActions));
userConfig.put("transport.tcp.connect_timeout", "5s");

return userConfig;
}
Expand Down

0 comments on commit 9511243

Please sign in to comment.