making all waitForViews have an initial 100ms wait this completely removed the flakyness when running the tests on my emulator
This commit is contained in:
parent
f08d3965c1
commit
d2aec09b5b
@ -70,6 +70,8 @@ fun waitForView(viewMatcher: Matcher<View>, timeout: Long = 10_000, waitForDispl
|
||||
val endTime = startTime + timeout
|
||||
val visibleMatcher = isDisplayed()
|
||||
|
||||
uiController.loopMainThreadForAtLeast(100)
|
||||
|
||||
do {
|
||||
println("*** waitForView loop $view end:$endTime current:${System.currentTimeMillis()}")
|
||||
val viewVisible = TreeIterables.breadthFirstViewTraversal(view)
|
||||
@ -93,6 +95,8 @@ fun waitForView(viewMatcher: Matcher<View>, timeout: Long = 10_000, waitForDispl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun initialSyncIdlingResource(session: Session): IdlingResource {
|
||||
val res = object : IdlingResource, Observer<SyncState> {
|
||||
private var callback: IdlingResource.ResourceCallback? = null
|
||||
|
Loading…
x
Reference in New Issue
Block a user