From c91b13257dc7337116c141f9aa1ade6db555a995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Kalici=C5=84ski?= Date: Mon, 5 Aug 2024 09:22:14 +0200 Subject: [PATCH] Fix test --- .../kotlin/com/pubnub/integration/ChannelIntegrationTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/integration/ChannelIntegrationTest.kt b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/integration/ChannelIntegrationTest.kt index 683f9d92..1402df7a 100644 --- a/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/integration/ChannelIntegrationTest.kt +++ b/pubnub-chat-impl/src/commonTest/kotlin/com/pubnub/integration/ChannelIntegrationTest.kt @@ -90,9 +90,11 @@ class ChannelIntegrationTest : BaseChatIntegrationTest() { @Test fun join_updates_lastReadMessageTimetoken() = runTest { + val then = Instant.fromEpochSeconds(chat.pubNub.time().await().timetoken / 10000000) val channel = chat.createChannel(randomString()).await() - val then = Clock.System.now() + val lastReadMessage = channel.join().await().membership.lastReadMessageTimetoken + assertNotNull(lastReadMessage) assertContains(then..Clock.System.now(), Instant.fromEpochSeconds(lastReadMessage / 10000000)) }