diff --git a/Sources/StreamChat/ChatClient.swift b/Sources/StreamChat/ChatClient.swift index 2e2797cacb..3627ed00da 100644 --- a/Sources/StreamChat/ChatClient.swift +++ b/Sources/StreamChat/ChatClient.swift @@ -339,7 +339,7 @@ public class ChatClient { continuation.resume(with: error) } } - return try await makeConnectedUser() + return try makeConnectedUser() } /// Connects the client with the given user. @@ -391,7 +391,7 @@ public class ChatClient { continuation.resume(with: error) } } - return try await makeConnectedUser() + return try makeConnectedUser() } /// Connects a guest user. @@ -423,7 +423,7 @@ public class ChatClient { continuation.resume(with: error) } } - return try await makeConnectedUser() + return try makeConnectedUser() } /// Connects an anonymous user @@ -447,7 +447,7 @@ public class ChatClient { continuation.resume(with: error) } } - return try await makeConnectedUser() + return try makeConnectedUser() } /// Sets the user token to the client, this method is only needed to perform API calls diff --git a/TestTools/StreamChatTestTools/Mocks/StreamChat/VoiceRecording/MockAVURLAsset.swift b/TestTools/StreamChatTestTools/Mocks/StreamChat/VoiceRecording/MockAVURLAsset.swift index c00ef04e55..5c13088519 100644 --- a/TestTools/StreamChatTestTools/Mocks/StreamChat/VoiceRecording/MockAVURLAsset.swift +++ b/TestTools/StreamChatTestTools/Mocks/StreamChat/VoiceRecording/MockAVURLAsset.swift @@ -5,7 +5,7 @@ import AVFoundation @dynamicMemberLookup -public final class MockAVURLAsset: AVURLAsset, Spy, Stub { +public final class MockAVURLAsset: AVURLAsset, Spy, Stub, @unchecked Sendable { public let spyState = SpyState() public var stubbedProperties: [String: Any] = [:] diff --git a/TestTools/StreamChatTestTools/Mocks/StreamChat/Workers/EventNotificationCenter_Mock.swift b/TestTools/StreamChatTestTools/Mocks/StreamChat/Workers/EventNotificationCenter_Mock.swift index a185dc1a8b..f2068ce8e9 100644 --- a/TestTools/StreamChatTestTools/Mocks/StreamChat/Workers/EventNotificationCenter_Mock.swift +++ b/TestTools/StreamChatTestTools/Mocks/StreamChat/Workers/EventNotificationCenter_Mock.swift @@ -6,7 +6,7 @@ import Foundation @testable import StreamChat /// Mock implementation of `EventNotificationCenter` -final class EventNotificationCenter_Mock: EventNotificationCenter { +final class EventNotificationCenter_Mock: EventNotificationCenter, @unchecked Sendable { override var newMessageIds: Set { newMessageIdsMock ?? super.newMessageIds diff --git a/TestTools/StreamChatTestTools/SpyPattern/Spy/DatabaseContainer_Spy.swift b/TestTools/StreamChatTestTools/SpyPattern/Spy/DatabaseContainer_Spy.swift index 3e7d621ef0..4594f706d3 100644 --- a/TestTools/StreamChatTestTools/SpyPattern/Spy/DatabaseContainer_Spy.swift +++ b/TestTools/StreamChatTestTools/SpyPattern/Spy/DatabaseContainer_Spy.swift @@ -7,7 +7,7 @@ import CoreData import XCTest /// A testable subclass of DatabaseContainer allowing response simulation. -public final class DatabaseContainer_Spy: DatabaseContainer, Spy { +public final class DatabaseContainer_Spy: DatabaseContainer, Spy, @unchecked Sendable { public let spyState = SpyState() /// If set, the `write` completion block is called with this value. diff --git a/Tests/StreamChatTests/Audio/StreamAppStateObserver_Tests.swift b/Tests/StreamChatTests/Audio/StreamAppStateObserver_Tests.swift index ee35fd76f8..5f25d2970d 100644 --- a/Tests/StreamChatTests/Audio/StreamAppStateObserver_Tests.swift +++ b/Tests/StreamChatTests/Audio/StreamAppStateObserver_Tests.swift @@ -90,7 +90,7 @@ final class StreamAppStateObserver_Tests: XCTestCase { } } -private final class StubNotificationCenter: NotificationCenter { +private final class StubNotificationCenter: NotificationCenter, @unchecked Sendable { struct ObserverRecord { var observer: AnyObject var selector: Selector diff --git a/Tests/StreamChatTests/Audio/StreamAudioRecorder_Tests.swift b/Tests/StreamChatTests/Audio/StreamAudioRecorder_Tests.swift index a8354de1df..943208f789 100644 --- a/Tests/StreamChatTests/Audio/StreamAudioRecorder_Tests.swift +++ b/Tests/StreamChatTests/Audio/StreamAudioRecorder_Tests.swift @@ -460,7 +460,7 @@ private final class MockΑudioRecorderMeterNormaliser: AudioValuePercentageNorma } @dynamicMemberLookup -private final class StubAudioRecorder: AVAudioRecorder, Stub { +private final class StubAudioRecorder: AVAudioRecorder, Stub, @unchecked Sendable { var stubbedProperties: [String: Any] = [:] var recordWasCalled = false diff --git a/Tests/StreamChatTests/Audio/StreamAudioSessionConfigurator_Tests.swift b/Tests/StreamChatTests/Audio/StreamAudioSessionConfigurator_Tests.swift index 29b4efaa08..7788c76c2e 100644 --- a/Tests/StreamChatTests/Audio/StreamAudioSessionConfigurator_Tests.swift +++ b/Tests/StreamChatTests/Audio/StreamAudioSessionConfigurator_Tests.swift @@ -363,7 +363,7 @@ private final class StubAVAudioSession: AudioSessionProtocol, Stub { } @dynamicMemberLookup -private final class StubAVAudioSessionPortDescription: AVAudioSessionPortDescription, Stub { +private final class StubAVAudioSessionPortDescription: AVAudioSessionPortDescription, Stub, @unchecked Sendable { var stubbedProperties: [String: Any] = [:] override var portType: AVAudioSession.Port { self[dynamicMember: \.portType] } diff --git a/Tests/StreamChatTests/Audio/StreamPlayerObserver_Tests.swift b/Tests/StreamChatTests/Audio/StreamPlayerObserver_Tests.swift index e8118f528a..f64c39220b 100644 --- a/Tests/StreamChatTests/Audio/StreamPlayerObserver_Tests.swift +++ b/Tests/StreamChatTests/Audio/StreamPlayerObserver_Tests.swift @@ -102,7 +102,7 @@ extension StreamPlayerObserver_Tests { } } - private class MockNotificationCenter: NotificationCenter { + private class MockNotificationCenter: NotificationCenter, @unchecked Sendable { private(set) var addObserverWasCalledWith: ( name: NSNotification.Name?, obj: Any?, diff --git a/Tests/StreamChatTests/Controllers/ChannelController/ChannelController_Tests.swift b/Tests/StreamChatTests/Controllers/ChannelController/ChannelController_Tests.swift index cfd89dbce0..4f5de48e33 100644 --- a/Tests/StreamChatTests/Controllers/ChannelController/ChannelController_Tests.swift +++ b/Tests/StreamChatTests/Controllers/ChannelController/ChannelController_Tests.swift @@ -5111,6 +5111,7 @@ final class ChannelController_Tests: XCTestCase { done(error) } } + XCTAssertNil(resultingError) XCTAssertEqual(channelId, env.memberUpdater!.partialUpdate_cid) XCTAssertEqual(currentUserId, env.memberUpdater!.partialUpdate_userId) XCTAssertEqual(nil, env.memberUpdater!.partialUpdate_unset) @@ -5133,6 +5134,7 @@ final class ChannelController_Tests: XCTestCase { done(error) } } + XCTAssertNil(resultingError) XCTAssertEqual(channelId, env.memberUpdater!.partialUpdate_cid) XCTAssertEqual(currentUserId, env.memberUpdater!.partialUpdate_userId) XCTAssertEqual(["pinned"], env.memberUpdater!.partialUpdate_unset) diff --git a/Tests/StreamChatTests/Database/FetchCache_Tests.swift b/Tests/StreamChatTests/Database/FetchCache_Tests.swift index 7a55904428..d35f5957e0 100644 --- a/Tests/StreamChatTests/Database/FetchCache_Tests.swift +++ b/Tests/StreamChatTests/Database/FetchCache_Tests.swift @@ -73,7 +73,7 @@ final class FetchCache_Tests: XCTestCase { } } -class TestId: NSManagedObjectID { +class TestId: NSManagedObjectID, @unchecked Sendable { override func uriRepresentation() -> URL { URL(string: "file://a")! }