From ce7532c02d316c5d66016920c66a77c1d6f8148e Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 10 Jul 2026 17:24:10 -0400 Subject: [PATCH] Yield during main actor stress testing --- bitchatTests/ConversationStoreTests.swift | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bitchatTests/ConversationStoreTests.swift b/bitchatTests/ConversationStoreTests.swift index 007bd49c..fe200353 100644 --- a/bitchatTests/ConversationStoreTests.swift +++ b/bitchatTests/ConversationStoreTests.swift @@ -334,7 +334,7 @@ struct ConversationStoreTests { @Test("logical index offset matches a reference model under adversarial mutations") @MainActor - func logicalIndexOffsetDifferentialStress() { + func logicalIndexOffsetDifferentialStress() async { let store = ConversationStore() let cap = store.conversation(for: .mesh).cap var reference = ReferenceConversationTimeline(cap: cap) @@ -383,20 +383,23 @@ struct ConversationStoreTests { return expected } - func refill(extra: Int, checkpoint: String) { + func refill(extra: Int, checkpoint: String) async { let appendCount = max(0, cap - reference.messages.count) + extra for index in 0.. 1_200) #expect(tailAppendCount > 300)