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