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.

* We are removing the `ZimHostFragment` test from the API level 33 because, most of the time, the emulator does not have WiFi service. Running this test on this emulator is not worthwhile, as we are testing this code on WiFi.
This commit is contained in:
MohitMaliFtechiz 2024-03-13 20:27:59 +05:30
parent f0eb680d21
commit 0d6d76b5db
2 changed files with 8 additions and 2 deletions

View File

@ -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:

View File

@ -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)
}