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
This commit is contained in:
parent
94ce356bc1
commit
ca61ac6ca3
@ -139,5 +139,8 @@ public class MediaControllerStubTest {
|
|||||||
/* query= */ "",
|
/* query= */ "",
|
||||||
/* itemCount= */ 1,
|
/* itemCount= */ 1,
|
||||||
/* libraryParams= */ getThrowingBundle());
|
/* libraryParams= */ getThrowingBundle());
|
||||||
|
|
||||||
|
session.release();
|
||||||
|
player.release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user