You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/02/18 08:13:40 UTC

[GitHub] [james-project] LanKhuat opened a new pull request #302: WIP: ElasticSearch version 7.2 test adaptation

LanKhuat opened a new pull request #302:
URL: https://github.com/apache/james-project/pull/302


   Follow up for: https://github.com/apache/james-project/pull/288/commits


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] Arsnael commented on pull request #302: WIP: ElasticSearch version 7.2 test adaptation

Posted by GitBox <gi...@apache.org>.
Arsnael commented on pull request #302:
URL: https://github.com/apache/james-project/pull/302#issuecomment-788578868


   Has been merged, but still need a bit more work


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] Arsnael closed pull request #302: WIP: ElasticSearch version 7.2 test adaptation

Posted by GitBox <gi...@apache.org>.
Arsnael closed pull request #302:
URL: https://github.com/apache/james-project/pull/302


   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] chibenwa commented on pull request #302: WIP: ElasticSearch version 7.2 test adaptation

Posted by GitBox <gi...@apache.org>.
chibenwa commented on pull request #302:
URL: https://github.com/apache/james-project/pull/302#issuecomment-787570279


   It is :green_apple: .
   
   Any opposition about merging it as is and continuing this work?


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] Arsnael commented on pull request #302: WIP: ElasticSearch version 7.2 test adaptation

Posted by GitBox <gi...@apache.org>.
Arsnael commented on pull request #302:
URL: https://github.com/apache/james-project/pull/302#issuecomment-787606499


   I'm not really opposed to merge this except that the ES migration has still not been merged itself


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] Arsnael commented on a change in pull request #302: WIP: ElasticSearch version 7.2 test adaptation

Posted by GitBox <gi...@apache.org>.
Arsnael commented on a change in pull request #302:
URL: https://github.com/apache/james-project/pull/302#discussion_r578222512



##########
File path: backends-common/elasticsearch-v7/src/test/java/org/apache/james/backends/es/v7/ElasticSearchIndexerTest.java
##########
@@ -165,22 +143,14 @@ void deleteByQueryShouldWorkOnSingleMessage() {
         RoutingKey routingKey = useDocumentId(documentId);
 
         testee.index(documentId, content, routingKey).block();
-        elasticSearch.awaitForElasticSearch();
-        
+        awaitForElasticSearch(QueryBuilders.matchAllQuery(),1L);

Review comment:
       idem

##########
File path: backends-common/elasticsearch-v7/src/test/java/org/apache/james/backends/es/v7/ElasticSearchIndexerTest.java
##########
@@ -165,22 +143,14 @@ void deleteByQueryShouldWorkOnSingleMessage() {
         RoutingKey routingKey = useDocumentId(documentId);
 
         testee.index(documentId, content, routingKey).block();
-        elasticSearch.awaitForElasticSearch();
-        
+        awaitForElasticSearch(QueryBuilders.matchAllQuery(),1L);
+
         testee.deleteAllMatchingQuery(termQuery("property", "1"), routingKey).block();
-        elasticSearch.awaitForElasticSearch();
-        
-        CALMLY_AWAIT.atMost(Duration.TEN_SECONDS)
-            .until(() -> client.search(
-                    new SearchRequest(INDEX_NAME.getValue())
-                        .source(new SearchSourceBuilder().query(QueryBuilders.matchAllQuery())),
-                    RequestOptions.DEFAULT)
-                .block()
-                .getHits().getTotalHits().value == 0);
+
+        awaitForElasticSearch(QueryBuilders.matchAllQuery(),0L);

Review comment:
       idem

##########
File path: backends-common/elasticsearch-v7/src/test/java/org/apache/james/backends/es/v7/ElasticSearchIndexerTest.java
##########
@@ -104,30 +96,16 @@ void indexMessageShouldThrowWhenJsonIsNull() {
     }
     
     @Test
-    @Disabled("JAMES-3492")
     void updateMessages() {
         String content = "{\"message\": \"trying out Elasticsearch\",\"field\":\"Should be unchanged\"}";
 
         testee.index(DOCUMENT_ID, content, useDocumentId(DOCUMENT_ID)).block();
-        elasticSearch.awaitForElasticSearch();
+        awaitForElasticSearch(QueryBuilders.matchAllQuery(),1L);

Review comment:
       space missing between your arguments

##########
File path: backends-common/elasticsearch-v7/src/test/java/org/apache/james/backends/es/v7/ElasticSearchIndexerTest.java
##########
@@ -196,68 +166,45 @@ void deleteByQueryShouldWorkWhenMultipleMessages() {
         String content3 = "{\"message\": \"trying out Elasticsearch 3\", \"property\":\"2\"}";
         
         testee.index(documentId3, content3, ROUTING).block();
-        elasticSearch.awaitForElasticSearch();
+        awaitForElasticSearch(QueryBuilders.matchAllQuery(),3L);

Review comment:
       idem




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org