From eba2bfdbc7fd2888bb1f5ee6299923b875d11059 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Fri, 30 Aug 2024 14:39:20 +0200 Subject: [PATCH] Fixed test where channel options were mutated. --- Test/Tests/RealtimeClientChannelTests.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Test/Tests/RealtimeClientChannelTests.swift b/Test/Tests/RealtimeClientChannelTests.swift index 16a3caea9..f48484d75 100644 --- a/Test/Tests/RealtimeClientChannelTests.swift +++ b/Test/Tests/RealtimeClientChannelTests.swift @@ -1687,10 +1687,11 @@ class RealtimeClientChannelTests: XCTestCase { } } - channelOptions.modes = [.subscribe] + let channelOptions2 = ARTRealtimeChannelOptions() + channelOptions2.modes = [.subscribe] let client2 = ARTRealtime(options: options) defer { client2.dispose(); client2.close() } - let channelWithoutAttachResume = client2.channels.get(channelName, options: channelOptions) + let channelWithoutAttachResume = client2.channels.get(channelName, options: channelOptions2) waitUntil(timeout: testTimeout) { done in channelWithoutAttachResume.subscribe { message in XCTAssertEqual(message.name, "test")