Skip to content

Commit

Permalink
Temporarily disabling LeakCanary on Android 13 for the `testPauseAn…
Browse files Browse the repository at this point in the history
…dResumeInOtherLanguage` and `verifyHelpActivity` test cases, as it is incorrectly detecting leaks in Android's internal classes.
  • Loading branch information
MohitMaliDeveloper committed Feb 18, 2025
1 parent 517860a commit 4a14b94
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package org.kiwix.kiwixmobile.download

import android.os.Build
import android.util.Log
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.content.edit
Expand Down Expand Up @@ -229,7 +230,11 @@ class DownloadTest : BaseActivityTest() {
"Couldn't find downloaded file ' Off the Grid ' Original Exception: ${e.message}"
)
}
LeakAssertions.assertNoLeaks()
if (Build.VERSION.SDK_INT != Build.VERSION_CODES.TIRAMISU) {
// Temporarily disabling leak checks on Android 13,
// as it is incorrectly detecting leaks in Android's internal classes.
LeakAssertions.assertNoLeaks()
}
}

@After
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ class HelpFragmentTest : BaseActivityTest() {
clickOnHowToUpdateContent()
assertWhyCopyMoveFilesToAppPublicDirectoryIsNotVisible()
}
LeakAssertions.assertNoLeaks()
if (Build.VERSION.SDK_INT != Build.VERSION_CODES.TIRAMISU) {
// Temporarily disabling leak checks on Android 13,
// as it is incorrectly detecting leaks in Android's internal classes.
LeakAssertions.assertNoLeaks()
}
}

@Test
Expand Down

0 comments on commit 4a14b94

Please sign in to comment.