Closed DSteve595 closed 1 year ago
@DSteve595 can you rebase this PR? telephoto
is now able to run screenshot tests in PRs too!
:zoomable-image:core - Tests were flaky!
:white_check_mark: 119 passed / :warning: 1 flaky
First failure encountered:
me.saket.telephoto.zoomable.ZoomableImageTest.various_image_sizes_and_alignments[BottomCenter,Fill,SmallerThanLayoutSize,FillMaxSize,SubSamplingEnabled]
click for details
androidx.compose.ui.test.ComposeTimeoutException: Condition still not satisfied after 5000 ms
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$AndroidComposeUiTestImpl.waitUntil(ComposeUiTest.android.kt:448)
at androidx.compose.ui.test.junit4.AndroidComposeTestRule.waitUntil(AndroidComposeTestRule.android.kt:306)
at me.saket.telephoto.util.WaitUntilKt.waitUntil-8Mi8wO0(waitUntil.kt:7)
at me.saket.telephoto.zoomable.ZoomableImageTest.various_image_sizes_and_alignments(ZoomableImageTest.kt:214)
@saket Done! Is that flaky test from my PR?
Awesome! I don't think the flake was introduced here. I've been dealing with flakes for a while. They're proving really hard to solve.
Huh, emulator-wtf is now saying one test failed despite posting a success message earlier. I'll rerun the tests.
cc @madisp
Thanks Steve!
@saket hmm, I think this can happen if you have multiple modules and one of them succeeds at first (we don't know beforehand how many different module tests there can be so we can't really link them together like that) and another one fails later.
Ideally I'd like to figure out how to show GitHub checks for PR-triggered builds as well, that would have a stronger indication (you'd see some tests as running/queued first and you could make some set of checks as required via branch protection rules).
@madisp Got it, thanks for explaining!
9
This adds a convention plugin for modules using Kotlin Multiplatform + Jetbrains Compose, and migrates the :zoomable module to use it.
Things to note:
-Xjvm-default=all
properly.kotlin.test
, but that API is pretty basic.~ Now using assertk.(This is a re-open of #10, which got lost when something weird happened to my fork)