From 752e8c0927230cbf631168141c0ba8b2f40ac044 Mon Sep 17 00:00:00 2001 From: pascal Date: Tue, 9 Jun 2026 21:22:37 +0200 Subject: [PATCH] fix async test --- management/server/setupkey_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/management/server/setupkey_test.go b/management/server/setupkey_test.go index 6eca27efd..2d43ea28b 100644 --- a/management/server/setupkey_test.go +++ b/management/server/setupkey_test.go @@ -426,6 +426,10 @@ func TestSetupKeyAccountPeersUpdate(t *testing.T) { updateManager.CloseChannel(context.Background(), peer1.ID) }) + // The setup policy above dispatches affected-peer updates asynchronously; drain + // any in-flight ones so the assertions only observe the setup-key operations. + settleAffectedUpdates(updMsg) + var setupKey *types.SetupKey // Creating setup key should not update account peers and not send peer update