File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Modules/Tests/YosemiteTests/Tools/POS Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -195,12 +195,8 @@ struct POSCatalogSyncCoordinatorTests {
195195 try await Task . sleep ( nanoseconds: 10_000_000 ) // 10ms
196196
197197 // When - try to start second sync while first is blocked
198- do {
198+ await #expect ( throws : POSCatalogSyncError . syncAlreadyInProgress ( siteID : sampleSiteID ) ) {
199199 _ = try await sut. performFullSync ( for: sampleSiteID)
200- #expect( Bool ( false ) , " Should have thrown syncAlreadyInProgress error " )
201- } catch let error as POSCatalogSyncError {
202- // Then
203- #expect( error == POSCatalogSyncError . syncAlreadyInProgress ( siteID: sampleSiteID) )
204200 }
205201
206202 let currentState = await sut. loadLastFullSyncState ( for: sampleSiteID)
@@ -370,12 +366,8 @@ struct POSCatalogSyncCoordinatorTests {
370366 try await Task . sleep ( nanoseconds: 10_000_000 ) // 10ms
371367
372368 // When - try to start second incremental sync while first is blocked
373- do {
374- _ = try await sut. performIncrementalSyncIfApplicable ( for: sampleSiteID, maxAge: sampleMaxAge)
375- #expect( Bool ( false ) , " Should have thrown syncAlreadyInProgress error " )
376- } catch let error as POSCatalogSyncError {
377- // Then
378- #expect( error == POSCatalogSyncError . syncAlreadyInProgress ( siteID: sampleSiteID) )
369+ await #expect( throws: POSCatalogSyncError . syncAlreadyInProgress ( siteID: sampleSiteID) ) {
370+ try await sut. performIncrementalSyncIfApplicable ( for: sampleSiteID, maxAge: sampleMaxAge)
379371 }
380372
381373 // Cleanup
You can’t perform that action at this time.
0 commit comments