mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix flaky DRM assertion in AnalyticsCollectorTest
Session pre-fetching caused this ordering assertion to no longer be
always true. It should have been removed in
795ddfee40
#minor-release
PiperOrigin-RevId: 370880530
This commit is contained in:
parent
b71b067b81
commit
64e32d7c4c
1 changed files with 3 additions and 3 deletions
|
|
@ -1504,9 +1504,9 @@ public final class AnalyticsCollectorTest {
|
||||||
assertThat(listener.getEvents(EVENT_DRM_SESSION_ACQUIRED))
|
assertThat(listener.getEvents(EVENT_DRM_SESSION_ACQUIRED))
|
||||||
.containsExactly(period0, period1)
|
.containsExactly(period0, period1)
|
||||||
.inOrder();
|
.inOrder();
|
||||||
assertThat(listener.getEvents(EVENT_DRM_KEYS_LOADED))
|
// The pre-fetched key load for period1 might complete before the blocking key load for period0,
|
||||||
.containsExactly(period0, period1)
|
// so we can't assert the order:
|
||||||
.inOrder();
|
assertThat(listener.getEvents(EVENT_DRM_KEYS_LOADED)).containsExactly(period0, period1);
|
||||||
// The period1 release event is lost because it's posted to "ExoPlayerTest thread" after that
|
// The period1 release event is lost because it's posted to "ExoPlayerTest thread" after that
|
||||||
// thread has been quit during clean-up.
|
// thread has been quit during clean-up.
|
||||||
assertThat(listener.getEvents(EVENT_DRM_SESSION_RELEASED)).containsExactly(period0);
|
assertThat(listener.getEvents(EVENT_DRM_SESSION_RELEASED)).containsExactly(period0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue