Skip to content

test(chat): fix races of the chat viewmodel tests with Dispatchers.Default - #7075

Merged
mahibi merged 1 commit into
masterfrom
fixChatViewModelRoomJoinTest
Nov 19, 2026
Merged

mahibi merged 1 commit into
masterfrom
fixChatViewModelRoomJoinTest

Conversation

@mahibi

@mahibi mahibi commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

The message pipeline of a viewmodel calls the repository from Dispatchers.Default. A call during the stubbing of the thread replies took the stub, so the thread test waited forever for replies. Stub before any viewmodel exists and fail on a timeout instead of hanging.

After a test, the cancelled pipeline could still use Dispatchers.Main while it was reset. Clear every viewmodel and wait for its work to end before resetting Main.

Assisted-by: Claude Code:claude-opus-5-5

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…fault

The message pipeline of a viewmodel calls the repository from
Dispatchers.Default. A call during the stubbing of the thread replies
took the stub, so the thread test waited forever for replies. Stub
before any viewmodel exists and fail on a timeout instead of hanging.

After a test, the cancelled pipeline could still use Dispatchers.Main
while it was reset. Clear every viewmodel and wait for its work to
end before resetting Main.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi added this to the 26.0.0 milestone Nov 19, 2026
@mahibi mahibi self-assigned this Nov 19, 2026
@mahibi

mahibi commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable-25.1.x

@mahibi
mahibi merged commit fa5a57b into master Nov 19, 2026
16 of 19 checks passed
@mahibi
mahibi deleted the fixChatViewModelRoomJoinTest branch November 19, 2026 16:03
@mahibi

mahibi commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

needed to merge now as this currently blocks my release process optimizations

@github-actions

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit a18e6f6
Version 7075
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant