Skip to content

test: make :allTests pass locally (Android host variant + Compose UI test)#16

Merged
Merkost merged 2 commits into
mainfrom
chore/disable-android-host-unittests
Jun 5, 2026
Merged

test: make :allTests pass locally (Android host variant + Compose UI test)#16
Merkost merged 2 commits into
mainfrom
chore/disable-android-host-unittests

Conversation

@Merkost

@Merkost Merkost commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

Running ./gradlew :kurrency-core:allTests :kurrency-deci:allTests :kurrency-compose:allTests locally failed on two unrelated, pre-existing environment issues. This makes a full local allTests run green, with no loss of real coverage. CI is unaffected (it runs the per-platform test tasks, not allTests).

1. Drop the Android host unit-test variant (kurrency-core)

testAndroidHostTest ran commonTest against the Android impl (android.icu.text.NumberFormat / DecimalFormatSymbols) on a stub JVM where android.icu isn't real, so ISO-code/grouping/locale tests failed spuriously (16 failures). The same tests pass on jvmTest, and real Android behavior is covered by connectedAndroidDeviceTest. Removed the withHostTest {} 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)

CurrencyFormatterComposablesTest uses runComposeUiTest, which needs Skiko's native binary; on headless JS/WasmJs it fails with org_jetbrains_skia_Surface… is not defined. Moved it from commonTest to jvmTest (which has compose.desktop.currentOs), so it runs where Compose UI testing actually works. CurrencyStateTest stays in commonTest (pure logic, runs on all platforms).

Result

:kurrency-core:allTests, :kurrency-deci:allTests, and :kurrency-compose:allTests are all green locally (JVM/JS/WasmJs/iOS), and CurrencyFormatterComposablesTest now executes on JVM only.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 5, 2026 05:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the kurrency-core Android target.
  • Keeps Android instrumented/device testing configuration (withDeviceTest {}) intact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread kurrency-core/build.gradle.kts
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>
@Merkost Merkost changed the title test(core): drop Android host unit-test variant (spurious ICU failures) test: make :allTests pass locally (Android host variant + Compose UI test) Jun 5, 2026
@Merkost Merkost merged commit 7b814e7 into main Jun 5, 2026
2 checks passed
@Merkost Merkost deleted the chore/disable-android-host-unittests branch June 5, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants