From c6e18773f6c01cd99e646700e83f16e1d939293a Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Mon, 18 Nov 2024 15:11:59 -0300 Subject: [PATCH] Fix intermittent test failure --- Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift b/Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift index 49ddb4a9..183b40f1 100644 --- a/Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift +++ b/Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift @@ -984,7 +984,9 @@ struct DefaultRoomLifecycleManagerTests { try await manager.performAttachOperation() // This is to put the manager into the DETACHING state, to satisfy "with a room lifecycle operation in progress" + let roomStatusSubscription = await manager.onChange(bufferingPolicy: .unbounded) async let _ = manager.performDetachOperation() + _ = await roomStatusSubscription.first { $0.current == .detaching } // When: The aforementioned contributor emits an ATTACHED event with `resumed` flag set to false let contributorStateChange = ARTChannelStateChange(