diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/testutils/TestUtils.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/testutils/TestUtils.kt index d5f0c0063e..5415737813 100644 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/testutils/TestUtils.kt +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/testutils/TestUtils.kt @@ -54,7 +54,11 @@ object TestUtils { @JvmField var TEST_PAUSE_MS = 3000 var TEST_PAUSE_MS_FOR_SEARCH_TEST = 1000 var TEST_PAUSE_MS_FOR_DOWNLOAD_TEST = 10000 - const val RETRY_COUNT_FOR_FLAKY_TEST = 3 + + // Increased retry count to 5 for flaky test cases on API level 33, + // where failures occurred multiple times due to the heavy `google_apis`. + // so to address this we have increased it to 5 to properly run the test cases. + const val RETRY_COUNT_FOR_FLAKY_TEST = 5 /* TEST_PAUSE_MS is used as such: diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt index d2f663a40e..22e0735d04 100644 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt @@ -98,7 +98,9 @@ class ZimHostFragmentTest { @Test fun testZimHostFragment() { - if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) { + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1 && + Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU + ) { activityScenario.onActivity { it.navigate(R.id.libraryFragment) }