Repository navigation
test(tui): fix data race on mock UpdateSettings calls - #1844
Conversation
Tests polled testify's Mock.Calls from another goroutine while the tview app goroutine recorded new calls, tripping the race detector on Windows and macOS and failing every remaining test in pkg/ui/tui.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Several TUI backup and online tests read testify's
mockSvc.Callswithout its lock while the tview app goroutine was recording newUpdateSettingscalls. On Windows and macOS the race detector caught this inTestBuildBackupSettingsMenu_AutoBackupDisabledOnManual_Integration, and every later test inpkg/ui/tuiwas marked failed.MockSettingsServicenow recordsUpdateSettingsparams under a mutex and exposes a copy throughUpdateSettingsParams(). The three places that readCallsdirectly now use that method.Closes #1843
Summary by CodeRabbit