test: make :allTests pass locally (Android host variant + Compose UI test)#16
Merged
Merged
Conversation
The Android host (local-JVM) unit-test variant runs commonTest against the Android impl, which uses android.icu. On the host JVM android.icu is stubbed, so ISO/grouping/locale formatting tests fail spuriously (e.g. `:kurrency-core:allTests` reported 16 false failures). Common logic is covered by jvmTest and real Android behavior by connectedAndroidDeviceTest, so the host variant adds no coverage — only noise. CI is unaffected (it runs the per-platform test tasks, not allTests). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adjusts the kurrency-core Kotlin Multiplatform Android test configuration to avoid running commonTest against the Android implementation on the host JVM (where android.icu behavior is stubbed/incorrect), eliminating spurious locale/formatting failures when running aggregated test tasks.
Changes:
- Removed the
withHostTest {}configuration from thekurrency-coreAndroid target. - Keeps Android instrumented/device testing configuration (
withDeviceTest {}) intact.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CurrencyFormatterComposablesTest uses runComposeUiTest, which needs Skiko's native binary; on headless JS/WasmJs that fails with "org_jetbrains_skia_* is not defined". Move it from commonTest to jvmTest (which has compose.desktop.currentOs) so it runs where Compose UI testing works. CurrencyStateTest stays in commonTest (pure logic, runs on all platforms). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Running
./gradlew :kurrency-core:allTests :kurrency-deci:allTests :kurrency-compose:allTestslocally failed on two unrelated, pre-existing environment issues. This makes a full localallTestsrun green, with no loss of real coverage. CI is unaffected (it runs the per-platform test tasks, notallTests).1. Drop the Android host unit-test variant (
kurrency-core)testAndroidHostTestrancommonTestagainst the Android impl (android.icu.text.NumberFormat/DecimalFormatSymbols) on a stub JVM whereandroid.icuisn't real, so ISO-code/grouping/locale tests failed spuriously (16 failures). The same tests pass onjvmTest, and real Android behavior is covered byconnectedAndroidDeviceTest. Removed thewithHostTest {}block; coverage in practice is unchanged (common logic →jvmTest/js/wasm/ios; real Android → device tests).2. Run the Compose UI test on JVM only (
kurrency-compose)CurrencyFormatterComposablesTestusesrunComposeUiTest, which needs Skiko's native binary; on headless JS/WasmJs it fails withorg_jetbrains_skia_Surface… is not defined. Moved it fromcommonTesttojvmTest(which hascompose.desktop.currentOs), so it runs where Compose UI testing actually works.CurrencyStateTeststays incommonTest(pure logic, runs on all platforms).Result
:kurrency-core:allTests,:kurrency-deci:allTests, and:kurrency-compose:allTestsare all green locally (JVM/JS/WasmJs/iOS), andCurrencyFormatterComposablesTestnow executes on JVM only.🤖 Generated with Claude Code