You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "LostArtist (via GitHub)" <gi...@apache.org> on 2023/08/08 19:44:49 UTC

[GitHub] [camel] LostArtist opened a new pull request, #11055: CAMEL-19725: replaced Thread.sleep() in camel-opensearch tests

LostArtist opened a new pull request, #11055:
URL: https://github.com/apache/camel/pull/11055

   (no comment)


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] orpiske commented on pull request #11055: CAMEL-19725: replaced Thread.sleep() in camel-opensearch tests

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on PR #11055:
URL: https://github.com/apache/camel/pull/11055#issuecomment-1673017028

   > main branch is open for commits for 4.1 work
   
   Thanks! I'll start merging the queued items


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] orpiske merged pull request #11055: CAMEL-19725: replaced Thread.sleep() in camel-opensearch tests

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske merged PR #11055:
URL: https://github.com/apache/camel/pull/11055


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] orpiske commented on a diff in pull request #11055: CAMEL-19725: replaced Thread.sleep() in camel-opensearch tests

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on code in PR #11055:
URL: https://github.com/apache/camel/pull/11055#discussion_r1288118975


##########
components/camel-opensearch/src/test/java/org/apache/camel/component/opensearch/integration/OpensearchGetSearchDeleteExistsUpdateIT.java:
##########
@@ -289,13 +291,12 @@ void testSearchWithMapQuery() throws Exception {
         HitsMetadata<?> response = template().requestBody("direct:search", query, HitsMetadata.class);
         assertNotNull(response, "response should not be null");
         assertNotNull(response.total());
-        assertEquals(0, response.total().value(), "response hits should be == 0");
 
         // Match
         actualQuery.put("doc.testSearchWithMapQuery1", "foo");
 
         // Delay the execution, because the search is getting stale results
-        Thread.sleep(2000);
+        Awaitility.await().pollDelay(2, TimeUnit.SECONDS).untilAsserted(() -> assertEquals(0, response.total().value(), "response hits should be == 0"));

Review Comment:
   I'm under the impression you have to refresh the reference to the response. As it is, I think you are just delaying the assertion of the `response.total().value()`.
   
   I believe, it would need to be similar to this:
   
   ```
   assertEquals(0, response.total().value(), "response hits should be == 0"));
   Awaitility.await().pollDelay(2, TimeUnit.SECONDS).untilAsserted(() -> 
           HitsMetadata<?> response = template().requestBody("direct:search", builder, HitsMetadata.class);
           assertNotNull(response, "response should not be null");
           // ... other assertions 
   }
   ```
   
   You probably need to investigate using the same pattern for the others as well.
   
   



-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] orpiske commented on pull request #11055: CAMEL-19725: replaced Thread.sleep() in camel-opensearch tests

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on PR #11055:
URL: https://github.com/apache/camel/pull/11055#issuecomment-1671238142

   The recent changes are OK. Keeping as "requested changes" because we are about to prepare the release and this can go on 4.1. 


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] github-actions[bot] commented on pull request #11055: CAMEL-19725: replaced Thread.sleep() in camel-opensearch tests

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11055:
URL: https://github.com/apache/camel/pull/11055#issuecomment-1670210946

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :camel: Maintainers, please note that first-time contributors *require manual approval* for the GitHub Actions to run.
   
   :warning: Please note that the changes on this PR may be **tested automatically** if they change components.
   
   :robot: Use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot.
   
   If necessary Apache Camel Committers may access logs and test results in the job summaries!


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] davsclaus commented on pull request #11055: CAMEL-19725: replaced Thread.sleep() in camel-opensearch tests

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #11055:
URL: https://github.com/apache/camel/pull/11055#issuecomment-1672727980

   main branch is open for commits for 4.1 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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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