Skip to content

Commit 6bbb90e

Browse files
author
Ruben Nine
committed
Fixing unstable test.
1 parent 33d76a0 commit 6bbb90e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

FilestackSDKTests/UploadTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ class UploadTests: XCTestCase {
6969
stubMultipartCompleteRequest()
7070

7171
let expectation = self.expectation(description: "request should succeed")
72-
let progressExpectation = self.expectation(description: "request should succeed")
73-
72+
var progressExpectation: XCTestExpectation? = self.expectation(description: "request should succeed")
7473
var json: [String: Any]!
7574

7675
let progressHandler: ((Progress) -> Void) = { progress in
7776
if progress.completedUnitCount == UploadTests.largeFileSize {
78-
progressExpectation.fulfill()
77+
progressExpectation?.fulfill()
78+
progressExpectation = nil
7979
}
8080
}
8181

0 commit comments

Comments
 (0)