Skip to content

Commit

Permalink
Increase tolerance to improve test stability
Browse files Browse the repository at this point in the history
  • Loading branch information
waliid committed Dec 7, 2024
1 parent 81a622a commit 701997c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Tests/AnalyticsTests/ComScore/ComScoreTrackerSeekTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ final class ComScoreTrackerSeekTests: ComScoreTestCase {

expectAtLeastHits(
pause { labels in
expect(labels.ns_st_po).to(beCloseTo(0, within: 0.5))
expect(labels.ns_st_po).to(beCloseTo(0, within: 2))
},
play { labels in
expect(labels.ns_st_po).to(beCloseTo(7, within: 0.5))
expect(labels.ns_st_po).to(beCloseTo(7, within: 2))
}
) {
player.seek(at(.init(value: 7, timescale: 1)))
Expand All @@ -51,7 +51,7 @@ final class ComScoreTrackerSeekTests: ComScoreTestCase {

expectAtLeastHits(
play { labels in
expect(labels.ns_st_po).to(beCloseTo(7, within: 0.5))
expect(labels.ns_st_po).to(beCloseTo(7, within: 2))
}
) {
player.play()
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 @@ -79,7 +79,7 @@ final class ComScoreTrackerTests: ComScoreTestCase {

expectAtLeastHits(
pause { labels in
expect(labels.ns_st_po).to(beCloseTo(1, within: 0.5))
expect(labels.ns_st_po).to(beCloseTo(1, within: 2))
}
) {
player.pause()
Expand All @@ -97,7 +97,7 @@ final class ComScoreTrackerTests: ComScoreTestCase {
expectAtLeastHits(
play(),
end { labels in
expect(labels.ns_st_po).to(beCloseTo(Stream.mediumOnDemand.duration.seconds, within: 0.5))
expect(labels.ns_st_po).to(beCloseTo(Stream.mediumOnDemand.duration.seconds, within: 2))
}
) {
player.play()
Expand All @@ -114,7 +114,7 @@ final class ComScoreTrackerTests: ComScoreTestCase {
expectAtLeastHits(
play(),
end { labels in
expect(labels.ns_st_po).to(beCloseTo(5, within: 0.5))
expect(labels.ns_st_po).to(beCloseTo(5, within: 2))
}
) {
// See 2. at the top of this file.
Expand Down
2 changes: 1 addition & 1 deletion Tests/PlayerTests/Skips/SkipForwardTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ final class SkipForwardTests: TestCase {
waitUntil { done in
player.skipForward { finished in
expect(finished).to(beTrue())
expect(player.time()).to(equal(seekTo, by: beClose(within: 0.5)))
expect(player.time()).to(equal(seekTo, by: beClose(within: 2)))
done()
}
}
Expand Down

0 comments on commit 701997c

Please sign in to comment.