Skip to content

Commit

Permalink
Increased retry count to 5 for flaky test cases on API level 33, wher…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
MohitMaliDeveloper authored and MohitMaliFtechiz committed Mar 14, 2024
1 parent 0099557 commit f2b62d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit f2b62d9

Please sign in to comment.