From d7a2ec779af2f2e63dba0853b2f9ef99a8d6234a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 13 Jul 2026 10:39:21 +0100 Subject: [PATCH] fix(ci): retain macOS notification test observer --- .../Tests/OpenClawIPCTests/MacNodeModeCoordinatorTests.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/macos/Tests/OpenClawIPCTests/MacNodeModeCoordinatorTests.swift b/apps/macos/Tests/OpenClawIPCTests/MacNodeModeCoordinatorTests.swift index 948eb18aa98e..aad8ac679d92 100644 --- a/apps/macos/Tests/OpenClawIPCTests/MacNodeModeCoordinatorTests.swift +++ b/apps/macos/Tests/OpenClawIPCTests/MacNodeModeCoordinatorTests.swift @@ -155,7 +155,9 @@ struct MacNodeModeCoordinatorTests { nodeHostWorker: worker, notificationCenter: notificationCenter, observeNotifications: true) - _ = coordinator + // Notification handlers capture the coordinator weakly. Keep its observer + // alive until both asynchronous restart checks finish. + defer { withExtendedLifetime(coordinator) {} } notificationCenter.post(name: .openclawConfigDidChange, object: nil)