Skip to content

Commit

Permalink
Shorten waiting times
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos committed Dec 9, 2024
1 parent 42e4157 commit a516672
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions Tests/AnalyticsTests/ComScore/ComScorePageViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ final class ComScorePageViewTests: ComScoreTestCase {

func testAutomaticTrackingWithoutProtocolImplementation() {
let viewController = UIViewController()
expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
viewController.simulateViewAppearance()
}
}

func testManualTrackingWithoutProtocolImplementation() {
let viewController = UIViewController()
expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
viewController.trackPageView()
}
}
Expand Down Expand Up @@ -179,7 +179,7 @@ final class ComScorePageViewTests: ComScoreTestCase {
let viewController2 = AutomaticMockViewController(title: "title2")
let tabBarController = UITabBarController()
tabBarController.viewControllers = [viewController1, viewController2]
expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
viewController2.simulateViewAppearance()
}
}
Expand Down Expand Up @@ -209,14 +209,14 @@ final class ComScorePageViewTests: ComScoreTestCase {
UINavigationController(rootViewController: viewController1),
UINavigationController(rootViewController: viewController2)
]
expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
viewController2.simulateViewAppearance()
}
}

func testManualTracking() {
let viewController = ManualMockViewController()
expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
viewController.simulateViewAppearance()
}
expectAtLeastHits(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final class ComScoreTrackerMetadataTests: ComScoreTestCase {
]
))

expectNoHits(during: .seconds(3)) {
expectNoHits(during: .milliseconds(500)) {
player.play()
}
}
Expand All @@ -53,7 +53,7 @@ final class ComScoreTrackerMetadataTests: ComScoreTestCase {
]
))

expectNoHits(during: .seconds(3)) {
expectNoHits(during: .milliseconds(500)) {
player.play()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ final class ComScoreTrackerRateTests: ComScoreTestCase {
player.play()
expect(player.playbackState).toEventually(equal(.playing))

expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
player.setDesiredPlaybackSpeed(1)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class ComScoreTrackerSeekTests: ComScoreTestCase {

expect(player.playbackState).toEventually(equal(.paused))

expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
player.seek(at(.init(value: 7, timescale: 1)))
}

Expand Down
6 changes: 3 additions & 3 deletions Tests/AnalyticsTests/ComScore/ComScoreTrackerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ final class ComScoreTrackerTests: ComScoreTestCase {
ComScoreTracker.adapter { _ in .test }
]
))
expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
player.pause()
}
}
Expand Down Expand Up @@ -132,7 +132,7 @@ final class ComScoreTrackerTests: ComScoreTestCase {
ComScoreTracker.adapter { _ in .test }
]
))
expectNoHits(during: .seconds(3)) {
expectNoHits(during: .milliseconds(500)) {
player.play()
}
}
Expand Down Expand Up @@ -163,7 +163,7 @@ final class ComScoreTrackerTests: ComScoreTestCase {

player.isTrackingEnabled = false

expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
player.play()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class CommandersActHeartbeatTests: CommandersActTestCase {

func testNoHeartbeatInitially() {
_ = Self.player(from: .onDemand, into: &cancellables)
expectNoHits(during: .milliseconds(300))
expectNoHits(during: .milliseconds(500))
}

func testOnDemandHeartbeatAfterPlay() {
Expand Down Expand Up @@ -63,7 +63,7 @@ final class CommandersActHeartbeatTests: CommandersActTestCase {
expectAtLeastHits(pos()) {
player.play()
}
expectNoHits(during: .milliseconds(300)) {
expectNoHits(during: .milliseconds(500)) {
player.pause()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ final class CommandersActTrackerDvrPropertiesTests: CommandersActTestCase {
))
expect(player?.playbackState).toEventually(equal(.paused))

expectNoHits(during: .seconds(5)) {
expectNoHits(during: .milliseconds(500)) {
player = nil
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final class CommandersActTrackerSeekTests: CommandersActTestCase {

expect(player.playbackState).toEventually(equal(.paused))

expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
player.seek(at(.init(value: 7, timescale: 1)))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class CommandersActTrackerTests: CommandersActTestCase {
CommandersActTracker.adapter { _ in [:] }
]
))
expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
player.pause()
}
}
Expand Down Expand Up @@ -129,7 +129,7 @@ final class CommandersActTrackerTests: CommandersActTestCase {
player?.play()
}

expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
player = nil
}
}
Expand All @@ -141,7 +141,7 @@ final class CommandersActTrackerTests: CommandersActTestCase {
CommandersActTracker.adapter { _ in [:] }
]
))
expectNoHits(during: .seconds(3)) {
expectNoHits(during: .milliseconds(500)) {
player.play()
}
}
Expand Down Expand Up @@ -172,7 +172,7 @@ final class CommandersActTrackerTests: CommandersActTestCase {

player.isTrackingEnabled = false

expectNoHits(during: .seconds(2)) {
expectNoHits(during: .milliseconds(500)) {
player.play()
}

Expand Down

0 comments on commit a516672

Please sign in to comment.