Publish pending snapshots while awaiting person-picker identity
All checks were successful
review/code-claude No blocking findings on d18a05bd

This commit is contained in:
justinzeus 2026-11-07 01:46:39 +01:00
parent fd48426fa7
commit d18a05bdb0
2 changed files with 18 additions and 0 deletions

View file

@ -128,6 +128,8 @@ class PersonPickerSessionTest {
private fun awaitLoaded(user: JellyfinUser) { private fun awaitLoaded(user: JellyfinUser) {
try { try {
rule.waitUntil(10_000) { rule.waitUntil(10_000) {
// Setup navigation writes Compose state asynchronously; publish it before pumping replacement composition.
androidx.compose.runtime.snapshots.Snapshot.sendApplyNotifications()
Shadows.shadowOf(Looper.getMainLooper()).idle() Shadows.shadowOf(Looper.getMainLooper()).idle()
models.lastOrNull()?.signedInPerson == user.name!!.lowercase() && models.lastOrNull()?.signedInPerson == user.name!!.lowercase() &&
models.last().conductarr.identity.value?.signedIn == true && models.last().conductarr.identity.value?.signedIn == true &&

View file

@ -27,6 +27,22 @@ Upstream enables JVM unit tests only for debug variants; there is no
`testDefaultReleaseUnitTest` task. `make test` uses the closest default-flavor `testDefaultReleaseUnitTest` task. `make test` uses the closest default-flavor
task without changing upstream's test configuration. task without changing upstream's test configuration.
### Full-suite test diagnostics
The Gradle daemon heap (`org.gradle.jvmargs` in `gradle.properties`) is separate
from the forked test-worker heap. The default test worker uses 512 MiB; changing
the daemon's `-Xmx` does not increase it. A larger worker heap did not resolve
the person-picker fixture's missing Compose snapshot notifications.
Gradle 9.8.2 runs previously failed test classes first on the next invocation.
An immediate green `make test` rerun can therefore hide an order-sensitive
failure rather than prove a fix. For comparisons, clear only generated binary
test-result history (`build/test-results/<task>/binary` in each module) before
each run and record actual class-start order; XML file listing order is not
execution order. Keep worker heap and parallelism unchanged between samples.
`PersonPickerSessionTest` must also pass late in the full app JVM, not just alone
or promoted to the front by previous failures.
## Saved-person launch and DNS ## Saved-person launch and DNS
Launch restores an unprotected saved Jellyfin login from local storage before Launch restores an unprotected saved Jellyfin login from local storage before