mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Release MediaSession
and ExoPlayer
in MediaControllerStubTest
Due to poor isolation between the session tests, in particular the static state in `MediaSession.SESSION_ID_TO_SESSION_MAP`, an unreleased session at the end of one test can cause subsequent tests to fail with obscure errors like `Session ID must be unique`. #minor-release PiperOrigin-RevId: 600737697 (cherry picked from commit ca61ac6ca35427a697a6645c90cc8e12889c78f7)
This commit is contained in:
parent
21e6c1c43e
commit
dd9f61005e
@ -139,5 +139,8 @@ public class MediaControllerStubTest {
|
||||
/* query= */ "",
|
||||
/* itemCount= */ 1,
|
||||
/* libraryParams= */ getThrowingBundle());
|
||||
|
||||
session.release();
|
||||
player.release();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user