File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,12 @@ class StressTests: XCTestCase {
2828 guard URLProtocol . registerClass ( BlockNetworkCalls . self) else { XCTFail ( ) ; return }
2929
3030 let analytics = Analytics ( configuration: Configuration ( writeKey: " stressTest2 " )
31- /* .errorHandler({ error in
31+ . errorHandler ( { error in
3232 XCTFail ( " Storage Error: \( error) " )
33- })*/
33+ } )
3434 . httpSession ( RestrictedHTTPSession ( ) )
3535 )
36+ analytics. purgeStorage ( )
3637 analytics. storage. hardReset ( doYouKnowHowToUseThis: true )
3738
3839 DirectoryStore . fileValidator = { url in
@@ -102,11 +103,12 @@ class StressTests: XCTestCase {
102103 guard URLProtocol . registerClass ( BlockNetworkCalls . self) else { XCTFail ( ) ; return }
103104
104105 let analytics = Analytics ( configuration: Configuration ( writeKey: " stressTest2 " )
105- /* .errorHandler({ error in
106+ . errorHandler ( { error in
106107 XCTFail ( " Storage Error: \( error) " )
107- })*/
108+ } )
108109 . httpSession ( RestrictedHTTPSession ( ) )
109110 )
111+ analytics. purgeStorage ( )
110112 analytics. storage. hardReset ( doYouKnowHowToUseThis: true )
111113
112114 DirectoryStore . fileValidator = { url in
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ extension XCTestCase {
178178
179179 func waitUntilFinished( analytics: Analytics ? , file: StaticString = #filePath, line: UInt = #line) {
180180 addTeardownBlock { [ weak analytics] in
181- let instance = try await waitForTaskCompletion ( withTimeoutInSeconds: 30 ) {
181+ let instance = try await waitForTaskCompletion ( withTimeoutInSeconds: 3 ) {
182182 while analytics != nil {
183183 DispatchQueue . main. sync {
184184 RunLoop . current. run ( until: . distantPast)
You can’t perform that action at this time.
0 commit comments