From 00580d5afa553223a92a76de6f022eaab00f3c24 Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Wed, 10 Apr 2024 15:10:27 +0530 Subject: [PATCH] Increased ram, cores and heap-size for API level 30 emulator for better test performance. * Improved test performance. --- .github/workflows/ci.yml | 8 ++++---- .../kiwixmobile/nav/destination/library/LibraryRobot.kt | 1 + .../kiwixmobile/page/history/NavigationHistoryRobot.kt | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d70902a6..3f2f1e2f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,12 +47,12 @@ jobs: arch: x86_64 profile: pixel_2 emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none - ram-size: ${{ matrix.api-level == 33 && '6144M' || '4096M' }} - cores: ${{ matrix.api-level == 33 && 4 || 2 }} - disk-size: '14G' + ram-size: ${{ matrix.api-level != 24 && '6144M' || '4096M' }} + cores: ${{ matrix.api-level != 24 && 4 || 2 }} + disk-size: ${{ matrix.api-level != 24 && '20G' || '14G' }} sdcard-path-or-size: ${{ matrix.api-level != 33 && '1000M' || '4096M' }} disable-animations: true - heap-size: ${{ matrix.api-level == 33 && '512M' || '' }} + heap-size: ${{ matrix.api-level != 24 && '512M' || '' }} channel: canary script: bash contrib/instrumentation.sh diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/LibraryRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/LibraryRobot.kt index 50318195a..2b2bae521 100644 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/LibraryRobot.kt +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/LibraryRobot.kt @@ -130,6 +130,7 @@ class LibraryRobot : BaseRobot() { } private fun clickOnDeleteZimFile() { + pauseForBetterTestPerformance() onView(withText("DELETE")).perform(click()) } diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/NavigationHistoryRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/NavigationHistoryRobot.kt index 50e8e70e7..16f82b519 100644 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/NavigationHistoryRobot.kt +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/NavigationHistoryRobot.kt @@ -76,7 +76,7 @@ class NavigationHistoryRobot : BaseRobot() { } fun assertBackwardNavigationHistoryDialogDisplayed() { - pauseForBetterTestPerformance() + BaristaSleepInteractions.sleep(TestUtils.TEST_PAUSE_MS.toLong()) isVisible(TextId(R.string.backward_history)) } @@ -86,7 +86,7 @@ class NavigationHistoryRobot : BaseRobot() { } fun assertForwardNavigationHistoryDialogDisplayed() { - pauseForBetterTestPerformance() + BaristaSleepInteractions.sleep(TestUtils.TEST_PAUSE_MS.toLong()) isVisible(TextId(R.string.forward_history)) }