Skip to content

StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.

feat: add service state reset between Gradle invocations in platform smoke tests

David Nashash6af5c061d834
diff --git a/README.md b/README.md
index c2742cf1..ba100dc1 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
<a href="https://github.com/Davidona/StreamVault-IPTV/releases/latest/download/StreamVault.apk"><img src="https://img.shields.io/badge/Download-StreamVault.apk-2ea44f?style=for-the-badge&logo=android" alt="Download StreamVault APK" /></a>
<a href="https://github.com/Davidona/StreamVault-IPTV/releases/latest"><img src="https://img.shields.io/github/v/release/Davidona/StreamVault-IPTV?display_name=tag&style=for-the-badge&color=0f766e" alt="Latest StreamVault release" /></a>
<a href="https://github.com/Davidona/StreamVault-IPTV/releases"><img src="https://img.shields.io/github/downloads/Davidona/StreamVault-IPTV/total?style=for-the-badge&color=8b5cf6" alt="Total Downloads" /></a>
- <a href="https://discord.gg/eGPBMygcb"><img src="https://img.shields.io/badge/Discord-Join%20Server-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join the StreamVault Discord" /></a>
+ <a href="https://discord.gg/FrkumnnTz"><img src="https://img.shields.io/badge/Discord-Join%20Server-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join the StreamVault Discord" /></a>
<a href="docs/CHANGELOG.md"><img src="https://img.shields.io/badge/Changelog-View-2563eb?style=for-the-badge" alt="View changelog" /></a>
<a href="https://github.com/Davidona/StreamVault-IPTV/actions/workflows/release.yml"><img src="https://img.shields.io/github/actions/workflow/status/Davidona/StreamVault-IPTV/release.yml?branch=master&style=for-the-badge&label=CI" alt="GitHub Actions status" /></a>
<a href="https://ko-fi.com/davidona"><img src="https://img.shields.io/badge/Support-Ko--fi-ff5f5f?style=for-the-badge&logo=kofi" alt="Support on Ko-fi" /></a>
diff --git a/tools/run-platform-smoke.sh b/tools/run-platform-smoke.sh
index ae6db3a0..e7e7193f 100755
--- a/tools/run-platform-smoke.sh
+++ b/tools/run-platform-smoke.sh
@@ -50,6 +50,16 @@ if [ "$api_level" = "35" ] || [ "$api_level" = "36" ]; then
exit 1
fi
+ # Each service suite runs in a separate Gradle invocation. Clear the target app between
+ # invocations so a START_STICKY service from the preceding suite cannot be redelivered while
+ # the next timeout probe is starting.
+ reset_service_smoke_state() {
+ adb shell am force-stop com.streamvault.app.debug >/dev/null 2>&1 || true
+ adb shell pm clear com.streamvault.app.debug >/dev/null 2>&1 || true
+ }
+
+ reset_service_smoke_state
+
PLATFORM_SMOKE_ACTIVE_SUITE="com.streamvault.app.service.DownloadForegroundServiceInstrumentationTest"
export PLATFORM_SMOKE_ACTIVE_SUITE
./gradlew --console=plain \
@@ -58,6 +68,8 @@ if [ "$api_level" = "35" ] || [ "$api_level" = "36" ]; then
-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.service.DownloadForegroundServiceInstrumentationTest \
--no-daemon
+ reset_service_smoke_state
+
PLATFORM_SMOKE_ACTIVE_SUITE="com.streamvault.app.service.DownloadForegroundServiceQuotaInstrumentationTest"
export PLATFORM_SMOKE_ACTIVE_SUITE
./gradlew --console=plain \
@@ -66,6 +78,8 @@ if [ "$api_level" = "35" ] || [ "$api_level" = "36" ]; then
-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.service.DownloadForegroundServiceQuotaInstrumentationTest \
--no-daemon
+ reset_service_smoke_state
+
PLATFORM_SMOKE_ACTIVE_SUITE="com.streamvault.app.service.DownloadForegroundServiceRecoveryInstrumentationTest"
export PLATFORM_SMOKE_ACTIVE_SUITE
./gradlew --console=plain \