Skip to content

Commit 641d50b

Browse files
committed
Fix test issue
1 parent 5b233aa commit 641d50b

9 files changed

+11
-11
lines changed

Tests/LiveKitTests/DataStream/ByteStreamInfoTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@testable import LiveKit
1818
import XCTest
1919

20-
class ByteStreamInfoTests: XCTestCase {
20+
class ByteStreamInfoTests: LKTestCase {
2121
func testProtocolTypeConversion() {
2222
let info = ByteStreamInfo(
2323
id: "id",

Tests/LiveKitTests/DataStream/ByteStreamReaderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@testable import LiveKit
1818
import XCTest
1919

20-
class ByteStreamReaderTests: XCTestCase {
20+
class ByteStreamReaderTests: LKTestCase {
2121
private var continuation: StreamReaderSource.Continuation!
2222
private var reader: ByteStreamReader!
2323

Tests/LiveKitTests/DataStream/DataStreamTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class DataStreamTests: LKTestCase {
103103
case .send:
104104
// Only sending files is supported, write chunk to file first
105105
let fileURL = FileManager.default.temporaryDirectory
106-
.appending(path: "file-name.pdf")
106+
.appendingPathComponent("file-name.pdf")
107107
try testChunk.write(to: fileURL)
108108

109109
let info = try await room1.localParticipant.sendFile(fileURL, for: topic)

Tests/LiveKitTests/DataStream/FileInfoTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@testable import LiveKit
1818
import XCTest
1919

20-
class FileInfoTests: XCTestCase {
20+
class FileInfoTests: LKTestCase {
2121
func testReadInfo() throws {
2222
try testReadInfo(mimeType: "text/plain")
2323
try testReadInfo(mimeType: "application/json")
@@ -31,7 +31,7 @@ class FileInfoTests: XCTestCase {
3131
line: UInt = #line
3232
) throws {
3333
let fileURL = FileManager.default.temporaryDirectory
34-
.appending(path: UUID().uuidString)
34+
.appendingPathComponent(UUID().uuidString)
3535
.appendingPathExtension(FileInfo.preferredExtension(for: mimeType) ?? "")
3636

3737
let contents = Data(repeating: 0xFF, count: 32)
@@ -46,7 +46,7 @@ class FileInfoTests: XCTestCase {
4646
}
4747

4848
func testReadInfoUnreadable() {
49-
XCTAssertNil(FileInfo(for: URL(filePath: "/some/unreadable/path")))
49+
XCTAssertNil(FileInfo(for: URL(fileURLWithPath: "/some/unreadable/path")))
5050
}
5151

5252
func testPreferredExtensionCommon() {

Tests/LiveKitTests/DataStream/IncomingStreamManagerTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@testable import LiveKit
1818
import XCTest
1919

20-
class IncomingStreamManagerTests: XCTestCase {
20+
class IncomingStreamManagerTests: LKTestCase {
2121
private var manager: IncomingStreamManager!
2222

2323
private let topicName = "someTopic"

Tests/LiveKitTests/DataStream/OutgoingStreamManagerTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@testable import LiveKit
1818
import XCTest
1919

20-
class OutgoingStreamManagerTests: XCTestCase {
20+
class OutgoingStreamManagerTests: LKTestCase {
2121
func testStreamBytes() async throws {
2222
let headerExpectation = expectation(description: "Produces header packet")
2323
let chunkExpectation = expectation(description: "Produces chunk packets")

Tests/LiveKitTests/DataStream/TextStreamInfoTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@testable import LiveKit
1818
import XCTest
1919

20-
class TextStreamInfoTests: XCTestCase {
20+
class TextStreamInfoTests: LKTestCase {
2121
func testProtocolTypeConversion() {
2222
let info = TextStreamInfo(
2323
id: "id",

Tests/LiveKitTests/DataStream/TextStreamReaderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@testable import LiveKit
1818
import XCTest
1919

20-
class TextStreamReaderTests: XCTestCase {
20+
class TextStreamReaderTests: LKTestCase {
2121
private var continuation: StreamReaderSource.Continuation!
2222
private var reader: TextStreamReader!
2323

Tests/LiveKitTests/Support/Xcode14.2Backport.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public extension URLSession {
4141

4242
// Support for Xcode 14.2
4343
#if !compiler(>=5.8)
44-
extension LKTestCase {
44+
extension XCTestCase {
4545
func fulfillment(of expectations: [XCTestExpectation], timeout: TimeInterval, enforceOrder: Bool = false) async {
4646
await withCheckedContinuation { continuation in
4747
// This function operates by blocking a background thread instead of one owned by libdispatch or by the

0 commit comments

Comments
 (0)