From 77a035b6433d9b5b50c7e31c34dad6387af76865 Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 1 May 2025 15:54:49 +0200 Subject: [PATCH] Fix sync test --- PadelClubDataTests/SynchronizationTests.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PadelClubDataTests/SynchronizationTests.swift b/PadelClubDataTests/SynchronizationTests.swift index 06e117a..09049da 100644 --- a/PadelClubDataTests/SynchronizationTests.swift +++ b/PadelClubDataTests/SynchronizationTests.swift @@ -56,10 +56,13 @@ struct SynchronizationTests { } // Cleanup - let eventCollection1: SyncedCollection = StoreCenter.main.mainStore.registerSynchronizedCollection(synchronousLoading: true) + let eventCollection1: SyncedCollection = await StoreCenter.main.mainStore.synchronizedCollectionWithFileLoading() + #expect(eventCollection1.hasLoaded == true) + await eventCollection1.deleteAsync(contentOfs: Array(eventCollection1)) - let eventCollection2: SyncedCollection = self.secondStoreCenter.mainStore.registerSynchronizedCollection(synchronousLoading: true) + let eventCollection2: SyncedCollection = await self.secondStoreCenter.mainStore.synchronizedCollectionWithFileLoading() + #expect(eventCollection2.hasLoaded == true) eventCollection2.clear() // Create