Demogorgon314 commented on pull request #14373:
URL: https://github.com/apache/pulsar/pull/14373#issuecomment-1055476049


   @lhotari 
   In this PR, we need ensure ` objCache.getIfCached(key1)` only return 
`Optional.empty()` or correct value.
   
   If we use `Awaitility.await().untilAsserted(...);` here, when 
`objCache.getIfCached(key1)` return a wrong value it still retry.
   
   ```java
   Awaitility.await().untilAsserted(() -> {
       assertEquals(objCache.getIfCached(key1), Optional.of(v));
   });
   ```
   
   If `Awaitility` can do what I said, please tell me. Thanks! :-)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to