mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Session tests: Add missing CountdownLatch.await()
This helps deflake this test. PiperOrigin-RevId: 567288892
This commit is contained in:
parent
b4d03a9515
commit
fc91ee1d7b
1 changed files with 2 additions and 1 deletions
|
|
@ -616,7 +616,7 @@ public class MediaControllerCompatPlaybackStateCompatActionsWithMediaSessionTest
|
||||||
/* availableCommands= */ new Player.Commands.Builder()
|
/* availableCommands= */ new Player.Commands.Builder()
|
||||||
.add(Player.COMMAND_SEEK_TO_NEXT)
|
.add(Player.COMMAND_SEEK_TO_NEXT)
|
||||||
.build(),
|
.build(),
|
||||||
/* excludedCommand= */ new Player.Commands.Builder()
|
/* excludedCommands= */ new Player.Commands.Builder()
|
||||||
.add(Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM)
|
.add(Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM)
|
||||||
.build());
|
.build());
|
||||||
MediaSession mediaSession = createMediaSession(player);
|
MediaSession mediaSession = createMediaSession(player);
|
||||||
|
|
@ -1515,6 +1515,7 @@ public class MediaControllerCompatPlaybackStateCompatActionsWithMediaSessionTest
|
||||||
|
|
||||||
getInstrumentation().runOnMainSync(() -> mediaSession.setCustomLayout(customLayout));
|
getInstrumentation().runOnMainSync(() -> mediaSession.setCustomLayout(customLayout));
|
||||||
|
|
||||||
|
assertThat(latch.await(TIMEOUT_MS, MILLISECONDS)).isTrue();
|
||||||
assertThat(reportedCustomLayout.get())
|
assertThat(reportedCustomLayout.get())
|
||||||
.containsExactly(
|
.containsExactly(
|
||||||
customLayout.get(0).copyWithIsEnabled(true),
|
customLayout.get(0).copyWithIsEnabled(true),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue