Skip to content

Commit 301f901

Browse files
committed
Add flag allowing integration test skip. Set allow skip for multi cluster integration test.
1 parent cdf6ff7 commit 301f901

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Tests/AlgoliaSearchClientTests/Integration/MultiClusterIntegrationTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class MultipleClusterIntegrationTests: OnlineTestCase {
5656

5757
let date: Date = .init()
5858

59+
override var allowFailure: Bool { return true }
60+
5961
override var retryableTests: [() throws -> Void] {
6062
[multiCluster]
6163
}

Tests/AlgoliaSearchClientTests/Integration/OnlineTestCase.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class OnlineTestCase: XCTestCase {
1717
let retryCount: Int = 3
1818

1919
var retryableTests: [() throws -> Void] { return [] }
20+
21+
var allowFailure: Bool { return false }
2022

2123
/// Abstract base class for online test cases.
2224
///
@@ -54,7 +56,10 @@ class OnlineTestCase: XCTestCase {
5456
try test()
5557
break
5658
} catch let error where attemptCount == retryCount {
59+
try XCTSkipIf(allowFailure)
5760
throw Error.retryFailed(attemptCount: attemptCount, error: error)
61+
} catch _ {
62+
continue
5863
}
5964
}
6065
}

0 commit comments

Comments
 (0)