Repository navigation
test(agent): flush effects instead of polling for a released screen - #1464
Merged
Merged
Conversation
closing_settings_ends_a_sign_in_in_progress polled for up to five seconds for a background task to release the settings screen. GPUI releases entities in flush_effects, and run_until_parked never flushes, so the test was waiting for a task to flush for it. Flush directly, which needs no sleep and no background task. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
closing_settings_ends_a_sign_in_in_progressfailed on #1462's first CI run. #1455 then landed a retry loop that polls for up to 5 seconds, so the flake is already handled on master. This PR is a small cleanup, not an urgent fix: it replaces the loop with a direct flush, and it's fine to close if the loop is good enough.Why the direct flush works
GPUI releases dropped entities in
flush_effects, andrun_until_parkedonly runs the executor, so it never flushes. With a task-free entity, the entity was still unreleased after fiverun_until_parkedcalls and released on the firstcx.update. The test was therefore passing only when a background task happened to flush for it, which is what the loop waits for.cx.update(|_| {})flushes directly, so the test needs no sleep, timeout or background task.Testing
ui::settings::catalogtests pass, and clippy is clean formaple-agent-app.The original failed too rarely for the last two rows to separate the versions. The reason to prefer this one is the mechanism above, plus removing the sleep.
The pre-commit hook was skipped with
MAPLE_HOOK_SKIP=1. Its workspace tests includereads_native_release_tar_format_and_preserves_bundle_modes, which fails on this macOSbsdtarin an unrelated crate.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.