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 2022/06/01 08:04:44 UTC

[GitHub] [james-project] vttranlina commented on a diff in pull request #1033: Fixing unit test CassandraSieveDAOTest.deleteScriptInCassandraShouldWork

vttranlina commented on code in PR #1033:
URL: https://github.com/apache/james-project/pull/1033#discussion_r886479392


##########
server/data/data-cassandra/src/test/java/org/apache/james/sieve/cassandra/CassandraSieveDAOTest.java:
##########
@@ -105,10 +113,11 @@ void insertScriptShouldUpdateActivate() {
     void deleteScriptInCassandraShouldWork() {
         sieveDAO.insertScript(USERNAME, SCRIPT).block();
 
-        sieveDAO.deleteScriptInCassandra(USERNAME, SCRIPT_NAME).block();
-
-        Optional<Script> actual = sieveDAO.getScript(USERNAME, SCRIPT_NAME).blockOptional();
-        assertThat(actual).isEmpty();
+        CALMLY_AWAIT.atMost(Durations.TEN_SECONDS)
+            .untilAsserted(() -> {
+                sieveDAO.deleteScriptInCassandra(USERNAME, SCRIPT_NAME).block();
+                assertThat(sieveDAO.getScript(USERNAME, SCRIPT_NAME).blockOptional()).isEmpty();
+            });

Review Comment:
   Your pr works, 
   The unit test never fail, 
   The change in the consistency level of the table makes sense



-- 
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: notifications-unsubscribe@james.apache.org

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