Skip to content

Commit

Permalink
Fix compose idling
Browse files Browse the repository at this point in the history
  • Loading branch information
KovalevAndrey committed May 1, 2024
1 parent 2cae48b commit bcf8b1b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ class EspressoServerRunnerTest {
activityProvider = { error("Can't provide current activity") }
).also {
composeTestRule = it
composeTestRule.mainClock.autoAdvance = true
}

private val syncComposeClock = Thread {
while (!Server.isStopRequestReceived) {
if (context.currentStrategyType == DriverContext.StrategyType.COMPOSE) {
composeTestRule.mainClock.advanceTimeByFrame()
}
// if (context.currentStrategyType == DriverContext.StrategyType.COMPOSE) {
// composeTestRule.mainClock.advanceTimeByFrame()
// }

// Let Android run measure, draw and in general any other async operations. AndroidComposeTestRule.android.kt:325
Thread.sleep(ANDROID_ASYNC_WAIT_TIME_MS)
}
Expand Down

0 comments on commit bcf8b1b

Please sign in to comment.