mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Session tests: Add missing CountdownLatch.await()
This helps deflake this test. PiperOrigin-RevId: 567288892
This commit is contained in:
parent
b4d03a9515
commit
fc91ee1d7b
@ -616,7 +616,7 @@ public class MediaControllerCompatPlaybackStateCompatActionsWithMediaSessionTest
|
||||
/* availableCommands= */ new Player.Commands.Builder()
|
||||
.add(Player.COMMAND_SEEK_TO_NEXT)
|
||||
.build(),
|
||||
/* excludedCommand= */ new Player.Commands.Builder()
|
||||
/* excludedCommands= */ new Player.Commands.Builder()
|
||||
.add(Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM)
|
||||
.build());
|
||||
MediaSession mediaSession = createMediaSession(player);
|
||||
@ -1515,6 +1515,7 @@ public class MediaControllerCompatPlaybackStateCompatActionsWithMediaSessionTest
|
||||
|
||||
getInstrumentation().runOnMainSync(() -> mediaSession.setCustomLayout(customLayout));
|
||||
|
||||
assertThat(latch.await(TIMEOUT_MS, MILLISECONDS)).isTrue();
|
||||
assertThat(reportedCustomLayout.get())
|
||||
.containsExactly(
|
||||
customLayout.get(0).copyWithIsEnabled(true),
|
||||
|
Loading…
x
Reference in New Issue
Block a user