@@ -241,7 +241,7 @@ final class RealtimeTests: XCTestCase {
241241
242242 // Wait for the timeout for rejoining.
243243 await testClock. advance ( by: . seconds( timeoutInterval) )
244-
244+
245245 // Wait for the retry delay (base delay is 1.0s, but we need to account for jitter)
246246 // The retry delay is calculated as: baseDelay * pow(2, attempt-1) + jitter
247247 // For attempt 2: 1.0 * pow(2, 1) = 2.0s + jitter (up to ±25% = ±0.5s)
@@ -443,7 +443,7 @@ final class RealtimeTests: XCTestCase {
443443
444444 await testClock. advance ( by: . seconds( timeoutInterval) )
445445 subscribeTask. cancel ( )
446-
446+
447447 do {
448448 try await subscribeTask. value
449449 XCTFail ( " Expected cancellation error but got success " )
@@ -575,51 +575,6 @@ final class RealtimeTests: XCTestCase {
575575 XCTAssertEqual ( heartbeatStatuses. value, [ . sent, . timeout] )
576576 }
577577
578- func testBroadcastWithHTTP( ) async throws {
579- await http. when {
580- $0. url. path. hasSuffix ( " broadcast " )
581- } return: { _ in
582- HTTPResponse (
583- data: " {} " . data ( using: . utf8) !,
584- response: HTTPURLResponse (
585- url: self . sut. broadcastURL,
586- statusCode: 200 ,
587- httpVersion: nil ,
588- headerFields: nil
589- ) !
590- )
591- }
592-
593- let channel = sut. channel ( " public:messages " ) {
594- $0. broadcast. acknowledgeBroadcasts = true
595- }
596-
597- try await channel. broadcast ( event: " test " , message: [ " value " : 42 ] )
598-
599- let request = await http. receivedRequests. last
600- assertInlineSnapshot ( of: request? . urlRequest, as: . raw( pretty: true ) ) {
601- """
602- POST http://localhost:54321/realtime/v1/api/broadcast
603- Authorization: Bearer custom.access.token
604- Content-Type: application/json
605- apiKey: anon.api.key
606-
607- {
608- " messages " : [
609- {
610- " event " : " test " ,
611- " payload " : {
612- " value " : 42
613- },
614- " private " : false,
615- " topic " : " realtime:public:messages "
616- }
617- ]
618- }
619- """
620- }
621- }
622-
623578 func testSetAuth( ) async {
624579 let validToken =
625580 " eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjY0MDkyMjExMjAwfQ.GfiEKLl36X8YWcatHg31jRbilovlGecfUKnOyXMSX9c "
0 commit comments