commit 2139e0500cccd948a72e516a3a0742ad6c7a5472
parent 989abe0224173f0a0121e65ae5ffe7d6a4f3b6b3
Author: Michael Camilleri <[email protected]>
Date: Thu, 2 Jul 2026 00:14:15 +0900
Run tests in serial to prevent overwriting
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Tests/Unit/Sync/EngagementMessageAuthenticatorTests.swift b/Tests/Unit/Sync/EngagementMessageAuthenticatorTests.swift
@@ -3,7 +3,14 @@ import Testing
@testable import Crossmate
-@Suite("EngagementMessageAuthenticator")
+// Serialised: every `withAliceBobKey` test mutates the same global
+// `UserDefaults` key (`push.friendEncryptionKey.<pairKey(alice,bob)>`) and
+// removes it on the way out. Run in parallel, one test's cleanup can delete the
+// key while another is mid-flight, so `authTags` finds no local send key and
+// `roundTripVerifies` sees empty tags. The fixed pair is unique to this suite
+// (AccountPushCoordinatorTests uses a per-test UUID pair), so serialising here
+// is enough to isolate them.
+@Suite("EngagementMessageAuthenticator", .serialized)
struct EngagementMessageAuthenticatorTests {
private static let alice = "_alice"
private static let bob = "_bob"