You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rc...@apache.org on 2019/12/05 02:27:06 UTC
[james-project] 04/07: [refactoring use untilAsserted in place of
until in KeyContract
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit ab89340bd78536e96fd336e7daed49216f8d8649
Author: RĂ©mi KOWALSKI <rk...@linagora.com>
AuthorDate: Wed Dec 4 17:39:23 2019 +0100
[refactoring use untilAsserted in place of until in KeyContract
---
.../src/test/java/org/apache/james/mailbox/events/KeyContract.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/events/KeyContract.java b/mailbox/api/src/test/java/org/apache/james/mailbox/events/KeyContract.java
index 6f2ab58..f365ef3 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/events/KeyContract.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/events/KeyContract.java
@@ -80,7 +80,8 @@ public interface KeyContract extends EventBusContract {
IntStream.range(0, eventCount)
.forEach(i -> eventBus().dispatch(EVENT, KEY_1).block());
- WAIT_CONDITION.atMost(org.awaitility.Duration.TEN_MINUTES).until(() -> finishedExecutions.get() == eventCount);
+ WAIT_CONDITION.atMost(org.awaitility.Duration.TEN_MINUTES)
+ .untilAsserted(() -> assertThat(finishedExecutions.get()).isEqualTo(eventCount));
assertThat(rateExceeded).isFalse();
}
@@ -318,7 +319,7 @@ public interface KeyContract extends EventBusContract {
eventBus().dispatch(EVENT_2, KEY_1).block();
WAIT_CONDITION
- .until(() -> listener.numberOfEventCalls() == 1);
+ .untilAsserted(() -> assertThat(listener.numberOfEventCalls()).isEqualTo(1));
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org