Repository navigation
test(ui): fix the flaky connection-chooser smoke test - #833
Conversation
The smoke tests share one process, and passwords typed for an address are remembered process-wide. Another test leaving one for the shared address made the project open without the chooser now and then (main CI, and 1 in 72 runs here under load; 0 in 144 with this change).
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Isolate the chooser test address crates/ui-egui/tests/remembered_database/mod.rs |
The test uses ui_remembered_chooser instead of ui_remembered. A comment explains that remembered passwords are shared process-wide and that the unique address prevents other tests from affecting project-open selection. |
Priority:
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Other
Possibly related PRs
- opengeos/RustGIS#777: This PR introduced the remembered database credential behavior and chooser test that this change isolates.
Suggested reviewers: deniial00
Merge Risk: 
Minimal · up to ac968
-
The test isolation change is mergeable with no identified production or workflow risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the chooser’s place
A fresh address keeps tests apart
No saved password skips the race
The project opens as tests intend
Then hops away, content and pleased
Comment @coderabbitai help to get the list of available commands.
Code reviewI found nothing that needs changing. The PR is a test-only change: I checked the following by reading
Nits (low confidence, optional)
Change sizeCompared: the whole PR against main (merge base bb244b8 to PR head ac968ee).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
remembered_database_chooser_cancel_selection_and_project_scopefails now and then (main CI run for #814, and a PR run earlier today): the chooser dialog never opens (left: None, right: Some("chooseConnection")).Cause: the smoke tests run in one process, and the DuckDB driver remembers passwords per address process-wide (
crates/data/src/source/duckdb.rsPASSWORDS). Every test inremembered_database/mod.rsuses the same address, so a password another test leaves there can let the project's database resolve without asking which saved connection to use.Evidence: under CPU load locally, the full smoke suite failed this test 1 in 72 runs; the test alone under the same load passed 120 of 120. With its own database address, the full suite passed 144 of 144.
The fix gives this test its own address; test only.
Summary by CodeRabbit