@@ -37,6 +37,7 @@ class CountriesInteractorTests: XCTestCase {
3737
3838final class LoadCountriesTests : CountriesInteractorTests {
3939
40+ @MainActor
4041 func test_filledDB_successfulSearch( ) {
4142 let list = Country . mockedData
4243
@@ -136,6 +137,7 @@ final class LoadCountriesTests: CountriesInteractorTests {
136137 wait ( for: [ exp] , timeout: 2 )
137138 }
138139
140+ @MainActor
139141 func test_emptyDB_successfulRequest_successfulStoring( ) {
140142 let list = Country . mockedData
141143
@@ -173,6 +175,7 @@ final class LoadCountriesTests: CountriesInteractorTests {
173175 wait ( for: [ exp] , timeout: 2 )
174176 }
175177
178+ @MainActor
176179 func test_emptyDB_successfulRequest_failedStoring( ) {
177180 let list = Country . mockedData
178181 let error = NSError . test
@@ -214,6 +217,7 @@ final class LoadCountriesTests: CountriesInteractorTests {
214217
215218final class LoadCountryDetailsTests : CountriesInteractorTests {
216219
220+ @MainActor
217221 func test_filledDB_successfulSearch( ) {
218222 let country = Country . mockedData [ 0 ]
219223 let data = countryDetails ( neighbors: [ ] )
@@ -246,6 +250,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
246250 wait ( for: [ exp] , timeout: 2 )
247251 }
248252
253+ @MainActor
249254 func test_filledDB_dataNotFound_failedRequest( ) {
250255 let country = Country . mockedData [ 0 ]
251256 let error = NSError . test
@@ -280,6 +285,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
280285 wait ( for: [ exp] , timeout: 2 )
281286 }
282287
288+ @MainActor
283289 func test_filledDB_dataNotFound_successfulRequest_failedStoring( ) {
284290 let country = Country . mockedData [ 0 ]
285291 let data = countryDetails ( neighbors: [ ] )
@@ -317,6 +323,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
317323 wait ( for: [ exp] , timeout: 2 )
318324 }
319325
326+ @MainActor
320327 func test_filledDB_dataNotFound_successfulRequest_successfulStoring( ) {
321328 let country = Country . mockedData [ 0 ]
322329 let data = countryDetails ( neighbors: [ ] )
@@ -353,6 +360,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
353360 wait ( for: [ exp] , timeout: 2 )
354361 }
355362
363+ @MainActor
356364 func test_stubInteractor( ) {
357365 let sut = StubCountriesInteractor ( )
358366 sut. refreshCountriesList ( ) . sinkToResult ( { _ in } ) . store ( in: & subscriptions)
@@ -364,6 +372,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
364372
365373 // MARK: - Helper
366374
375+ @MainActor
367376 private func recordAppStateUserDataUpdates( for timeInterval: TimeInterval = 0.5 )
368377 -> AnyPublisher < [ AppState . UserData ] , Never > {
369378 return Future < [ AppState . UserData ] , Never > { ( completion) in
0 commit comments