From dbd872e86bcbd4efafc5a7bd2998bba5a8644bd1 Mon Sep 17 00:00:00 2001 From: Marcin Beczynski Date: Sat, 7 Nov 2026 22:19:35 +0100 Subject: [PATCH] =?UTF-8?q?Usu=C5=84=203=20ostrze=C5=BCenia=20Sendable=20(?= =?UTF-8?q?SMBProbe.liveExchange,=20HealthAlertTests)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- mac-app/Sources/CloudMachineCore/SMBProbe.swift | 2 +- mac-app/Tests/CloudMachineAppTests/HealthAlertTests.swift | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mac-app/Sources/CloudMachineCore/SMBProbe.swift b/mac-app/Sources/CloudMachineCore/SMBProbe.swift index fbdfd16..7191a16 100644 --- a/mac-app/Sources/CloudMachineCore/SMBProbe.swift +++ b/mac-app/Sources/CloudMachineCore/SMBProbe.swift @@ -135,7 +135,7 @@ public enum SMBProbe { } /// One connection: connect, send, read the first 8 bytes - all within `timeout`. - public static func liveExchange( + @Sendable public static func liveExchange( host: String, port: UInt16, request: [UInt8], timeout: TimeInterval ) -> Exchange { let deadline = Date().addingTimeInterval(timeout) diff --git a/mac-app/Tests/CloudMachineAppTests/HealthAlertTests.swift b/mac-app/Tests/CloudMachineAppTests/HealthAlertTests.swift index 48cb25b..e014dbf 100644 --- a/mac-app/Tests/CloudMachineAppTests/HealthAlertTests.swift +++ b/mac-app/Tests/CloudMachineAppTests/HealthAlertTests.swift @@ -49,8 +49,9 @@ final class HealthAlertTests: XCTestCase { _ report: BackupHealth.Report, now: Date = Date(), deliver: @escaping @Sendable (String, String) async -> Bool ) async -> Bool { - await HealthAlert.report( - report, now: now, stateFile: stateFile, deliver: deliver, log: log.write) + let captured = log! + return await HealthAlert.report( + report, now: now, stateFile: stateFile, deliver: deliver, log: { captured.write($0) }) } // MARK: - Finding 3: tests do not write to the production log