summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java/de/test/antennapod/ui
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2019-12-02 13:02:09 +0100
committerByteHamster <info@bytehamster.com>2019-12-12 09:47:16 +0100
commit44aa0a3239ee5fba3dc17f6f7e91fa5f24b737fc (patch)
tree343c58046c519c3a50f309a13e145fca91a9d708 /app/src/androidTest/java/de/test/antennapod/ui
parente2aa83f047e8ca762c19290a620fe47d154b74eb (diff)
downloadAntennaPod-44aa0a3239ee5fba3dc17f6f7e91fa5f24b737fc.zip
Try to kill playback service but do not fail if it does not stop
Android has no reliable way to stop a service instantly. Calling stopSelf marks allows the system to destroy the service but the actual call to onDestroy takes until the next GC of the system, which we can not influence. Try to wait for the service at least a bit.
Diffstat (limited to 'app/src/androidTest/java/de/test/antennapod/ui')
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/SpeedChangeTest.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/SpeedChangeTest.java b/app/src/androidTest/java/de/test/antennapod/ui/SpeedChangeTest.java
index 84a7a23bb..ff797b9bc 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/SpeedChangeTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/SpeedChangeTest.java
@@ -68,9 +68,7 @@ public class SpeedChangeTest {
UserPreferences.setPlaybackSpeedArray(new String[] {"1.00", "2.00", "3.00"});
availableSpeeds = UserPreferences.getPlaybackSpeedArray();
- context.sendBroadcast(new Intent(PlaybackService.ACTION_SHUTDOWN_PLAYBACK_SERVICE));
- Awaitility.await().until(() -> !PlaybackService.isRunning);
-
+ EspressoTestUtils.tryKillPlaybackService();
activityRule.launchActivity(new Intent());
}