Skip to content

Commit

Permalink
Fix test RTP19a - ensure incoming ATTACH message has no HAS_PRESENCE …
Browse files Browse the repository at this point in the history
…flag instead of requiring its absence (see RTP1).
  • Loading branch information
maratal committed Apr 21, 2024
1 parent ec8df5c commit 150070f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Test/Tests/RealtimeClientPresenceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,8 @@ class RealtimeClientPresenceTests: XCTestCase {
}
}

// FIXME: Fix flaky presence tests and re-enable. See https://ably-real-time.slack.com/archives/C030C5YLY/p1623172436085700
// RTP19a
func skipped__test__014__Presence__PresenceMap_has_existing_members_when_a_SYNC_is_started__should_emit_a_LEAVE_event_for_each_existing_member_if_the_PresenceMap_has_existing_members_when_an_ATTACHED_message_is_received_without_a_HAS_PRESENCE_flag() throws {
func test__014__Presence__PresenceMap_has_existing_members_when_a_SYNC_is_started__should_emit_a_LEAVE_event_for_each_existing_member_if_the_PresenceMap_has_existing_members_when_an_ATTACHED_message_is_received_without_a_HAS_PRESENCE_flag() throws {
let test = Test()
let options = try AblyTests.commonAppSetup(for: test)
let client = AblyTests.newRealtime(options).client
Expand All @@ -388,9 +387,10 @@ class RealtimeClientPresenceTests: XCTestCase {

waitUntil(timeout: testTimeout) { done in
let partialDone = AblyTests.splitDone(4, done: done)
transport.setListenerAfterProcessingIncomingMessage { protocolMessage in
transport.setListenerBeforeProcessingIncomingMessage { protocolMessage in
if protocolMessage.action == .attached {
XCTAssertFalse(protocolMessage.hasPresence)
// Ensure incoming ATTACH message has no HAS_PRESENCE flag
protocolMessage.flags = 0
partialDone()
}
}
Expand Down

0 comments on commit 150070f

Please sign in to comment.