Added test for shutdown/widget updater race in PSTM

This commit is contained in:
Joe Stein 2019-05-21 18:35:03 -04:00
parent c98a7c0c38
commit 4f3fa6246e

View File

@ -228,6 +228,15 @@ public class PlaybackServiceTaskManagerTest {
pstm.shutdown();
}
@Test
public void testStartWidgetUpdaterAfterShutdown() {
// Should not throw.
final Context c = InstrumentationRegistry.getInstrumentation().getTargetContext();
PlaybackServiceTaskManager pstm = new PlaybackServiceTaskManager(c, defaultPSTM);
pstm.shutdown();
pstm.startWidgetUpdater();
}
@Test
public void testIsWidgetUpdaterActive() {
final Context c = InstrumentationRegistry.getInstrumentation().getTargetContext();