From a6515d5450d4eac4b85b9644ea3dfa9d7140a49c Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Fri, 21 Jan 2022 22:15:34 +0100 Subject: [PATCH] Moved timeout control from the tests to the CI pipeline How fast a tests is executed on a shared CI pipeline is not predictable as the build might be throttled because other builds are running. Therefore adding extremely short timeouts inside the tests - where they can't be changed - is a bad idea. Removed them for now. --- .github/workflows/ci.yml | 1 + .../schabi/newpipe/local/history/HistoryRecordManagerTest.kt | 3 --- .../schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bf49a98a..49e78e997 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,7 @@ jobs: test-android: # macos has hardware acceleration. See android-emulator-runner action runs-on: macos-latest + timeout-minutes: 20 strategy: matrix: # api-level 19 is min sdk, but throws errors related to desugaring diff --git a/app/src/androidTest/java/org/schabi/newpipe/local/history/HistoryRecordManagerTest.kt b/app/src/androidTest/java/org/schabi/newpipe/local/history/HistoryRecordManagerTest.kt index f27bddea0..cfb2efcb6 100644 --- a/app/src/androidTest/java/org/schabi/newpipe/local/history/HistoryRecordManagerTest.kt +++ b/app/src/androidTest/java/org/schabi/newpipe/local/history/HistoryRecordManagerTest.kt @@ -25,9 +25,6 @@ class HistoryRecordManagerTest { @get:Rule val trampolineScheduler = TrampolineSchedulerRule() - @get:Rule - val timeout = Timeout(1, TimeUnit.SECONDS) - @Before fun setup() { database = TestDatabase.createReplacingNewPipeDatabase() diff --git a/app/src/androidTest/java/org/schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt b/app/src/androidTest/java/org/schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt index 249492d8f..ef7609604 100644 --- a/app/src/androidTest/java/org/schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt +++ b/app/src/androidTest/java/org/schabi/newpipe/local/playlist/LocalPlaylistManagerTest.kt @@ -20,9 +20,6 @@ class LocalPlaylistManagerTest { @get:Rule val trampolineScheduler = TrampolineSchedulerRule() - @get:Rule - val timeout = Timeout(1, TimeUnit.SECONDS) - @Before fun setup() { database = TestDatabase.createReplacingNewPipeDatabase()