From 83beaeb8ab7aa0d365f398600872b434c9b9cdf7 Mon Sep 17 00:00:00 2001 From: Israel Berezin Date: Wed, 8 May 2024 14:48:44 +0300 Subject: [PATCH] update Automation Test Dependency Libs (#479) * update Automation Test Dependency Libs Quick for 5.0.0 to 9.0.0 nimble for 7.50 to 13.3.0 * update timeout to 20 * update also remove observer name * Update pr.yml --- .github/workflows/pr.yml | 2 ++ .../AVPlayerEngine/AVPlayerEngine+Observation.swift | 2 +- Example/Tests/Basic/MessageBusTest.swift | 8 ++++---- Example/Tests/Basic/PlayerControllerTest.swift | 6 +++--- Example/Tests/Basic/TracksTest.swift | 4 ++-- Package.swift | 8 ++++---- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 96d90640..02276056 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -49,6 +49,8 @@ jobs: name: "tvOS" scheme: "PlayKit-Package" steps: + - name: Force Xcode 15 + run: sudo xcode-select -switch /Applications/Xcode_15.2.app - uses: actions/checkout@v4 - name: ${{ matrix.name }} run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean test | xcpretty diff --git a/Classes/Player/AVPlayerEngine/AVPlayerEngine+Observation.swift b/Classes/Player/AVPlayerEngine/AVPlayerEngine+Observation.swift index 1b1ea5b9..31574c45 100644 --- a/Classes/Player/AVPlayerEngine/AVPlayerEngine+Observation.swift +++ b/Classes/Player/AVPlayerEngine/AVPlayerEngine+Observation.swift @@ -62,7 +62,7 @@ extension AVPlayerEngine { NotificationCenter.default.removeObserver(self, name: .AVPlayerItemFailedToPlayToEndTime, object: self.currentItem) NotificationCenter.default.removeObserver(self, name: .AVPlayerItemDidPlayToEndTime, object: self.currentItem) - NotificationCenter.default.removeObserver(self, name: .AVPlayerItemNewAccessLogEntry, object: self.currentItem) + NotificationCenter.default.removeObserver(self, name: AVPlayerItem.newAccessLogEntryNotification, object: self.currentItem) NotificationCenter.default.removeObserver(self, name: .AVPlayerItemNewErrorLogEntry, object: self.currentItem) NotificationCenter.default.removeObserver(self, name: .AVPlayerItemPlaybackStalled, object: self.currentItem) NotificationCenter.default.removeObserver(self, name: Notification.Name(kCMTimebaseNotification_EffectiveRateChanged as String), object: nil) diff --git a/Example/Tests/Basic/MessageBusTest.swift b/Example/Tests/Basic/MessageBusTest.swift index e212f387..0e09e586 100644 --- a/Example/Tests/Basic/MessageBusTest.swift +++ b/Example/Tests/Basic/MessageBusTest.swift @@ -39,7 +39,7 @@ class MessageBusTest: XCTestCase { self.player.play() - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } func testPlayerPlayEventsFlow() { @@ -62,7 +62,7 @@ class MessageBusTest: XCTestCase { self.player.play() - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } func testPlayerPauseEventsFlow() { @@ -80,7 +80,7 @@ class MessageBusTest: XCTestCase { self.player.play() - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } func testPlayerSeekEventsFlow() { @@ -110,6 +110,6 @@ class MessageBusTest: XCTestCase { self.player.play() - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } } diff --git a/Example/Tests/Basic/PlayerControllerTest.swift b/Example/Tests/Basic/PlayerControllerTest.swift index dd578374..45d06296 100644 --- a/Example/Tests/Basic/PlayerControllerTest.swift +++ b/Example/Tests/Basic/PlayerControllerTest.swift @@ -39,7 +39,7 @@ class PlayerControllerTest: XCTestCase { XCTFail() } } - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } func testPauseCommand() { @@ -55,7 +55,7 @@ class PlayerControllerTest: XCTestCase { self.player.addObserver(self, events: [PlayerEvent.playing]) { [weak self] event in self?.player.pause() } - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } @@ -78,7 +78,7 @@ class PlayerControllerTest: XCTestCase { } } } - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } /// Test a guard mechanism that prevents receiving pause events after ended event. diff --git a/Example/Tests/Basic/TracksTest.swift b/Example/Tests/Basic/TracksTest.swift index 9dea80bc..e98c9f1e 100644 --- a/Example/Tests/Basic/TracksTest.swift +++ b/Example/Tests/Basic/TracksTest.swift @@ -46,7 +46,7 @@ class TracksTest: XCTestCase { } } - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } func testSelectTrack() { @@ -66,7 +66,7 @@ class TracksTest: XCTestCase { } } - waitForExpectations(timeout: 10.0) { (_) -> Void in} + waitForExpectations(timeout: 20.0) { (_) -> Void in} } override func tearDown() { diff --git a/Package.swift b/Package.swift index 3f5576d1..88d275e2 100644 --- a/Package.swift +++ b/Package.swift @@ -4,8 +4,8 @@ import PackageDescription let package = Package( name: "PlayKit", - platforms: [.iOS(.v11), - .tvOS(.v11)], + platforms: [.iOS(.v14), + .tvOS(.v14)], products: [.library(name: "PlayKit", targets: ["PlayKit"]), .library(name: "AnalyticsCommon", @@ -19,8 +19,8 @@ let package = Package( .package(name: "KalturaNetKit", url: "https://github.com/kaltura/netkit-ios.git", .upToNextMinor(from: "1.7.0")), - .package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "5.0.0")), - .package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "9.0.0")), + .package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "7.5.0")), + .package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "13.3.0")), ], targets: [.target(name: "PlayKit", dependencies: