Skip to content

Commit f709473

Browse files
authored
[Enhancement]Parallelize tests execution (#872)
1 parent b5dfb8b commit f709473

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

StreamVideoSwiftUITests/CallView/ParticipantListButton_Tests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ final class ParticipantListButton_Tests: StreamVideoUITestCase, @unchecked Senda
4848
}
4949

5050
private func assertSubject(
51+
record: Bool = false,
5152
@ViewBuilder _ subject: () -> some View,
5253
file: StaticString = #file,
5354
function: String = #function,
@@ -57,6 +58,7 @@ final class ParticipantListButton_Tests: StreamVideoUITestCase, @unchecked Senda
5758
subject(),
5859
variants: snapshotVariants,
5960
size: sizeThatFits,
61+
record: record,
6062
line: line,
6163
file: file,
6264
function: function

StreamVideoSwiftUITests/StreamVideoSwiftUI.xctestplan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
},
1414
"testTargets" : [
1515
{
16+
"parallelizable" : true,
1617
"skippedTests" : [
1718
"CallViewModel_Tests",
1819
"CallViewModel_Tests\/test_applicationDidBecomeActive_activatesAllTracksRequired()",

StreamVideoTests/StreamVideo.xctestplan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
},
3434
"testTargets" : [
3535
{
36+
"parallelizable" : true,
3637
"skippedTests" : [
3738
"ThermalStateObserverTests\/test_injectedValueWasSetCorrectly()"
3839
],

StreamVideoTests/WebRTC/v2/Stats/Reporter/WebRTCStatsReporter_Tests.swift

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,18 @@ final class WebRTCStatsReporter_Tests: XCTestCase, @unchecked Sendable {
8787

8888
await withTaskGroup(of: Void.self) { group in
8989
group.addTask {
90-
self.subject.sfuAdapter = self.mockSFUStack.adapter
91-
await self.wait(for: self.subject.interval / 2)
92-
93-
self.subject.sfuAdapter = sfuStack.adapter
94-
sfuStack.setConnectionState(to: .connected(healthCheckInfo: .init()))
90+
await self.wait(for: 0.2)
91+
self.subject.sfuAdapter = sfuStackB.adapter
9592
}
9693

9794
group.addTask {
9895
await self.wait(for: self.subject.interval)
99-
XCTAssertNil(self.mockSFUStack.service.sendStatsWasCalledWithRequest)
100-
XCTAssertNil(sfuStack.service.sendStatsWasCalledWithRequest)
96+
XCTAssertNil(sfuStackA.service.sendStatsWasCalledWithRequest)
97+
XCTAssertNil(sfuStackB.service.sendStatsWasCalledWithRequest)
10198

102-
await self.fulfillment { sfuStack.service.sendStatsWasCalledWithRequest != nil }
103-
XCTAssertNil(self.mockSFUStack.service.sendStatsWasCalledWithRequest)
104-
XCTAssertNotNil(sfuStack.service.sendStatsWasCalledWithRequest)
99+
await self.fulfillment { sfuStackB.service.sendStatsWasCalledWithRequest != nil }
100+
XCTAssertNil(sfuStackA.service.sendStatsWasCalledWithRequest)
101+
XCTAssertNotNil(sfuStackB.service.sendStatsWasCalledWithRequest)
105102
}
106103

107104
await group.waitForAll()

0 commit comments

Comments
 (0)