Skip to content

🐛 Fix flaky Windows dialog thread test - #620

Merged
vinceglb merged 1 commit into
mainfrom
vinceglb/fix-windows-dialog-thread-test
Jul 24, 2026
Merged

🐛 Fix flaky Windows dialog thread test#620
vinceglb merged 1 commit into
mainfrom
vinceglb/fix-windows-dialog-thread-test

Conversation

@vinceglb

Copy link
Copy Markdown
Owner

Summary

  • Test the Windows dialog worker base name and daemon flag at thread creation time.
  • Verify executor work runs on the factory-created thread without observing a coroutine-decorated live name.
  • Keep the dedicated single-thread STA executor, COM balancing, serialization, and real Windows dialog integration coverage unchanged.

Root cause

Coroutine debug instrumentation temporarily decorates the active thread name with a coroutine identifier. The previous test returned the mutable thread from withContext and could read its name before that decoration was restored.

Related to #600.

Testing

  • ./gradlew :filekit-dialogs:jvmTest --tests *WindowsDialogExecutorTest* --rerun-tasks -Dkotlinx.coroutines.debug=on --no-daemon
  • ./gradlew :filekit-dialogs:jvmTest --tests *WindowsDialogExecutorTest* --rerun-tasks -Dkotlinx.coroutines.debug=off --no-daemon
  • ./gradlew :filekit-dialogs:check --no-daemon
  • ktlint on the changed Kotlin files

@vinceglb
vinceglb merged commit ad85054 into main Jul 24, 2026
9 checks passed
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.

1 participant