Skip to content

Commit

Permalink
increase await time
Browse files Browse the repository at this point in the history
  • Loading branch information
PaRangger committed Jan 18, 2025
1 parent b560031 commit 009e107
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ void testDecreaseUnreadMessageCountWhenDeletingMessage() throws Exception {

request.delete("/api/courses/" + courseId + "/messages/" + createdPost2.getId(), HttpStatus.OK);
// After deleting the message in the second chat, the unread count in the first chat should stay the same, the unread count in the second chat will become 0
await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
SecurityUtils.setAuthorizationObject();
assertThat(getUnreadMessagesCount(oneToOneChat1, student2)).isEqualTo(1);
assertThat(getUnreadMessagesCount(oneToOneChat2, student2)).isZero();

Check failure on line 726 in src/test/java/de/tum/cit/aet/artemis/communication/MessageIntegrationTest.java

View workflow job for this annotation

GitHub Actions / H2 Tests

de.tum.cit.aet.artemis.communication.MessageIntegrationTest ► testDecreaseUnreadMessageCountWhenDeletingMessage()

Failed test found in: build/test-results/test/TEST-de.tum.cit.aet.artemis.communication.MessageIntegrationTest.xml Error: org.opentest4j.AssertionFailedError:
Raw output
org.opentest4j.AssertionFailedError: 
expected: 0L
 but was: 1L
	at app//de.tum.cit.aet.artemis.communication.MessageIntegrationTest.lambda$testDecreaseUnreadMessageCountWhenDeletingMessage$28(MessageIntegrationTest.java:726)
	at app//org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
	at app//org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
	at app//org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
	at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at [email protected]/java.lang.Thread.run(Thread.java:1583)
Expand Down

0 comments on commit 009e107

Please sign in to comment.