From 96e69f00bc75d40e2d1b27f1012d9288e1473c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Kalici=C5=84ski?= Date: Fri, 2 Aug 2024 10:55:33 +0200 Subject: [PATCH] Fix flaky test --- .../kotlin/com/pubnub/integration/ChatIntegrationTest.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/integration/ChatIntegrationTest.kt b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/integration/ChatIntegrationTest.kt index 1da3f1cd..0873a9ef 100644 --- a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/integration/ChatIntegrationTest.kt +++ b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/integration/ChatIntegrationTest.kt @@ -427,6 +427,7 @@ class ChatIntegrationTest : BaseChatIntegrationTest() { // send messages with user mentions channel01.sendText(text = message, mentionedUsers = messageMentionedUsers).await() + delayInMillis(1000) // when val currentUserMentionsResult: GetCurrentUserMentionsResult = chat.getCurrentUserMentions().await() @@ -437,7 +438,6 @@ class ChatIntegrationTest : BaseChatIntegrationTest() { assertEquals(1, currentUserMentionsResult.enhancedMentionsData.size) assertEquals(userId, userMentionData.userId) assertEquals(channelId01, userMentionData.channelId) - assertTrue(userMentionData.event.payload is EventContent.Mention) assertEquals(message, userMentionData.message?.content?.text) // remove messages @@ -465,7 +465,6 @@ class ChatIntegrationTest : BaseChatIntegrationTest() { assertEquals(userId, userMentionData.userId) assertEquals(true, userMentionData.parentChannelId.contains(CHANNEL_ID_OF_PARENT_MESSAGE_PREFIX)) assertEquals(true, userMentionData.threadChannelId.contains(THREAD_CHANNEL_ID_PREFIX)) - assertTrue(userMentionData.event.payload is EventContent.Mention) assertEquals(message, userMentionData.message?.content?.text) // remove messages