[ 
https://issues.apache.org/jira/browse/BEAM-5813?focusedWorklogId=165944&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-165944
 ]

ASF GitHub Bot logged work on BEAM-5813:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Nov/18 16:09
            Start Date: 14/Nov/18 16:09
    Worklog Time Spent: 10m 
      Work Description: timrobertson100 closed pull request #7038: [BEAM-5813] 
wait for the refresh of ES indices in all test utils that do index writes.
URL: https://github.com/apache/beam/pull/7038
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticSearchIOTestUtils.java
 
b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticSearchIOTestUtils.java
index e6b008cad20..a6719e14fee 100644
--- 
a/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticSearchIOTestUtils.java
+++ 
b/sdks/java/io/elasticsearch-tests/elasticsearch-tests-common/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticSearchIOTestUtils.java
@@ -66,7 +66,8 @@ private static void closeIndex(RestClient restClient, String 
index) throws IOExc
   private static void deleteIndex(RestClient restClient, String index) throws 
IOException {
     try {
       closeIndex(restClient, index);
-      restClient.performRequest("DELETE", String.format("/%s", index));
+      restClient.performRequest(
+          "DELETE", String.format("/%s", index), 
Collections.singletonMap("refresh", "wait_for"));
     } catch (IOException e) {
       // it is fine to ignore this expression as deleteIndex occurs in @before,
       // so when the first tests is run, the index does not exist yet
@@ -88,7 +89,8 @@ static void copyIndex(RestClient restClient, String source, 
String target) throw
                 "{\"source\" : { \"index\" : \"%s\" }, \"dest\" : { \"index\" 
: \"%s\" } }",
                 source, target),
             ContentType.APPLICATION_JSON);
-    restClient.performRequest("POST", "/_reindex", Collections.EMPTY_MAP, 
entity);
+    restClient.performRequest(
+        "POST", "/_reindex", Collections.singletonMap("refresh", "wait_for"), 
entity);
   }
 
   /** Inserts the given number of test documents into Elasticsearch. */
@@ -116,7 +118,7 @@ static void insertTestDocuments(
         new NStringEntity(bulkRequest.toString(), 
ContentType.APPLICATION_JSON);
     Response response =
         restClient.performRequest(
-            "POST", endPoint, Collections.singletonMap("refresh", "true"), 
requestBody);
+            "POST", endPoint, Collections.singletonMap("refresh", "wait_for"), 
requestBody);
     ElasticsearchIO.checkForErrors(
         response.getEntity(), 
ElasticsearchIO.getBackendVersion(connectionConfiguration));
   }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 165944)
    Time Spent: 50m  (was: 40m)

> ElasticSearchIOTest.testSplit is flaky
> --------------------------------------
>
>                 Key: BEAM-5813
>                 URL: https://issues.apache.org/jira/browse/BEAM-5813
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-elasticsearch
>            Reporter: Kenneth Knowles
>            Assignee: Etienne Chauchot
>            Priority: Critical
>              Labels: flake
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> [https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/1724/]
> [https://scans.gradle.com/s/xpsswtkdf62so/tests/y3up3nrnbr2ns-opjrlgkblx2ku]
> {code:java}
> Wrong number of splits expected:<25> but was:<22>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to