Skip to content

Commit

Permalink
Tweak wait parameters
Browse files Browse the repository at this point in the history
Change-Id: Ied1f9efb0243a7408c4f095b695604a0c9974aec
  • Loading branch information
keyboardsurfer committed Aug 8, 2023
1 parent 42995ee commit a46f315
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ class StartupBaselineProfile {
PACKAGE_NAME,
includeInStartupProfile = true,
) {
startActivityAndWait()
startActivityAndWait() // Just wait
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ fun MacrobenchmarkScope.forYouWaitForContent() {
device.wait(Until.gone(By.res("loadingWheel")), 5_000)
// Sometimes, the loading wheel is gone, but the content is not loaded yet
// So we'll wait here for topics to be sure
val obj = device.findObject(By.res("forYou:topicSelection"))
// Timeout here is quite big, because sometimes data loading takes a long time!
obj.wait(untilHasChildren(), 60_000)
device.findObject(By.res("forYou:topicSelection"))?.run {
// Timeout here is quite big, because sometimes data loading takes a long time!
wait(untilHasChildren(), 30_000)
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fun MacrobenchmarkScope.goToInterestsScreen() {
}

fun MacrobenchmarkScope.interestsScrollTopicsDownUp() {
device.wait(Until.hasObject(By.res("interests:topics")), 2_000)
device.wait(Until.hasObject(By.res("interests:topics")), 5_000)
val topicsList = device.findObject(By.res("interests:topics"))
device.flingElementDownUp(topicsList)
}
Expand Down

0 comments on commit a46f315

Please sign in to comment.