Skip to content

Commit

Permalink
Removed invalid RTL2f test (should test successful and unsuccessful c…
Browse files Browse the repository at this point in the history
…onnections recovery).
  • Loading branch information
maratal committed Oct 8, 2023
1 parent e54bef0 commit 1a5f933
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions Test/Tests/RealtimeClientChannelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -497,42 +497,7 @@ class RealtimeClientChannelTests: XCTestCase {
}
}

// RTL2f
func test__011__Channel__EventEmitter__channel_states_and_events__ChannelStateChange_will_contain_a_resumed_boolean_attribute_with_value__true__if_the_bit_flag_RESUMED_was_included() throws {
let test = Test()
let options = try AblyTests.commonAppSetup(for: test)
options.testOptions.transportFactory = TestProxyTransportFactory()
options.tokenDetails = try getTestTokenDetails(for: test, ttl: 5.0)
let client = ARTRealtime(options: options)
defer { client.dispose(); client.close() }
let channel = client.channels.get(test.uniqueChannelName())

waitUntil(timeout: testTimeout) { done in
channel.on { stateChange in
switch stateChange.current {
case .attached:
XCTAssertFalse(stateChange.resumed)
default:
XCTAssertFalse(stateChange.resumed)
}
}
client.connection.once(.disconnected) { stateChange in
channel.off()
guard let error = stateChange.reason else {
fail("Error is nil"); done(); return
}
XCTAssertEqual(error.code, ARTErrorCode.tokenExpired.intValue)
XCTAssertEqual(channel.state, ARTRealtimeChannelState.attached)
client.connection.once(.connected) { stateChange in
XCTAssertEqual(channel.state, ARTRealtimeChannelState.attached)
let transport = client.internal.transport as! TestProxyTransport
XCTAssertEqual(transport.protocolMessagesReceived.filter { $0.action == .attached && $0.resumed }.count, 1)
done()
}
}
channel.attach()
}
}
// TODO: RTL2f

// RTL3

Expand Down

0 comments on commit 1a5f933

Please sign in to comment.