Skip to content

Commit 86f94ca

Browse files
committed
test: Mark Android UI tests as flaky and increase timeout
- Add the `@FlakyTest` annotation to the `AndroidUiTests` class to indicate that these tests are unstable. - Double the `ASSERT_WAIT_TIMEOUT_MILLIS` in `ext.kt` from 10,000 to 20,000 milliseconds to provide more time for assertions in UI tests, helping to mitigate flakiness.
1 parent b403b71 commit 86f94ca

File tree

2 files changed

+3
-1
lines changed
  • app/android/src/androidTest/java/com/softartdev/notedelight/ui
  • ui/test/src/commonMain/kotlin/com/softartdev/notedelight

2 files changed

+3
-1
lines changed

app/android/src/androidTest/java/com/softartdev/notedelight/ui/AndroidUiTests.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.softartdev.notedelight.ui
33
import androidx.compose.ui.test.junit4.createAndroidComposeRule
44
import androidx.test.espresso.Espresso
55
import androidx.test.ext.junit.runners.AndroidJUnit4
6+
import androidx.test.filters.FlakyTest
67
import androidx.test.filters.LargeTest
78
import com.softartdev.notedelight.MainActivity
89
import leakcanary.DetectLeaksAfterTestSuccess
@@ -13,6 +14,7 @@ import org.junit.rules.RuleChain
1314
import org.junit.runner.RunWith
1415

1516
@LargeTest
17+
@FlakyTest
1618
@RunWith(AndroidJUnit4::class)
1719
class AndroidUiTests : AbstractJvmUiTests() {
1820

ui/test/src/commonMain/kotlin/com/softartdev/notedelight/ext.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import androidx.compose.ui.test.hasTestTag
1212
import androidx.compose.ui.test.waitUntilDoesNotExist
1313
import co.touchlab.kermit.Logger
1414

15-
const val ASSERT_WAIT_TIMEOUT_MILLIS: Long = 10_000
15+
const val ASSERT_WAIT_TIMEOUT_MILLIS: Long = 20_000
1616
const val MAX_RETRY_ATTEMPTS = 100
1717

1818
inline fun retryUntilDisplayed(

0 commit comments

Comments
 (0)