Skip to content

Commit dee9fee

Browse files
committed
Try skipping once
1 parent e2722b6 commit dee9fee

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

FirebaseStorage/Tests/SwiftIntegration/StorageIntegration.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class StorageIntegration: XCTestCase {
4040
signInAndWait()
4141
}
4242

43-
if !StorageIntegration.once {
43+
// if !StorageIntegration.once {
4444
let setupExpectation = expectation(description: "setUp")
4545

4646
let largeFiles = ["ios/public/1mb"]
@@ -75,7 +75,7 @@ class StorageIntegration: XCTestCase {
7575
}
7676
waitForExpectations()
7777
StorageIntegration.once = true
78-
}
78+
// }
7979
}
8080

8181
override func tearDown() {
@@ -497,10 +497,14 @@ class StorageIntegration: XCTestCase {
497497
let tmpDirURL = URL(fileURLWithPath: NSTemporaryDirectory())
498498
let fileURL = tmpDirURL.appendingPathComponent("hello.dat")
499499
let task = ref.write(toFile: fileURL)
500+
var failed = false // Only fail once
500501

501502
task.observe(StorageTaskStatus.failure, handler: { snapshot in
502503
XCTAssertTrue(snapshot.description.starts(with: "<State: Failed"))
503-
expectation.fulfill()
504+
if !failed {
505+
failed = true
506+
expectation.fulfill()
507+
}
504508
})
505509

506510
task.observe(StorageTaskStatus.progress, handler: { _ in

0 commit comments

Comments
 (0)