Repository navigation
The window tests pass at any hour and give the core a minute to answer, and a press on GNOME's title bar selects no text - #309
Merged
Merged
Conversation
…sts wait for the core with one 30 s budget The demo's files are 20 to 90 minutes old: from about 00:20 to 01:00 a day line between the newer messages lifts the photo the test clicks under the chat's header, so the click missed it. The test now scrolls the photo's message to the top first. The waits for the core's answer (2 to 30 s, copied in twelve places) are one `until` in view's window tests, failing after 30 s: a passing test returns as soon as the answer is seen.
…bar test passes the pointer over real text The test moved the pointer to two fixed points of the window, which missed the messages' text except from 00:42 to 00:44, when a day line among the demo's messages put one there; then it failed, because the press did start a selection. It now passes down the timeline over the messages' text and checks it did, and the title bar's press suppresses text selection, as gpui-base's own controls that own a press do. Review: the window tests' budget is 60 s, named after the slowest wait (a backup's Argon2), and their waits fail at the line that waited; the file-click test checks its scroll and scrolls back to the newest before the right-click.
Owner
Author
Review (
|
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.
What changed
a_click_on_a_file_presses_it_and_leaves_the_keys_in_the_composer(core/desktop/src/app/files.rs) scrolls the photo's message to the top of the timeline before clicking it, and checks that the scroll happened. It scrolls back to the newest message before the right-click onfile-7.until, in the window tests ofcore/desktop/src/app/view.rs, runs the window's tasks until a condition holds. It fails after 60 s (ANSWER_WITHIN), at the line that waited (#[track_caller]). Before, each module had its own copy of the loop, with budgets from 2 s to 30 s:said(view.rs) is built onuntil. The copy ofsaidinchats.rsis gone; chats uses view's.until/waithelpers insettings.rs,notifications.rs,drafts.rs,running.rs,backup.rs,stories.rsandview_once.rscall the shareduntil. Their signatures and call sites stay the same.chats.rs(a chat picture read, a missing one let go), the reaction's answer inactions/mod.rs, and the core's answer to Esc after a failed history transfer inview.rs.core/desktop/src/app/layout.rs). The title bar's drag area calls gpui-base'sGlobalState::suppress_text_selectionon a press, as gpui-base's own controls that own a press do. The title bar is drawn only on GNOME's Wayland session.a_click_or_a_pass_over_the_title_bar_neither_moves_nor_maximizes_the_window_nor_selects, moved the pointer to two fixed points of the window.Why
The failure #305 saw came from the hour, not from the load.
file-3) until its centre is past the timeline's top. In a probe at 00:38, the photo's bounds ran from y −71 to 169. The click at its centre (y 49) landed on the chat's header, so nothing was asked of the core, andsaidreported "nothing was said".yeson 12 cores (load average 106 to 171), main's binary passed this test 4 of 4 times alone. It also passed 3 of 3 full desktop runs, and 3 rounds of three full runs at once. The 2 s budget ofsaidheld there.The waits still had small budgets, copied twelve times. They were 2 s in six places, 5 s in two, 10 s in one and 30 s in one. Under heavier load they were the next thing to break. One shared budget, set by the slowest wait, removes that, and the diff deletes more test code than it adds.
The title bar test only passed because its pointer missed the text.
Other tests and the hour. I ran the whole desktop suite with "now" set to different local times. Each time was set with a POSIX
TZstring, for exampleTZ=HUSH-0:51for UTC+0:51; chrono'sLocalhonours it.Not changed, on purpose:
polls.rs100 ms,view_once.rs100 ms twice, and the history Esc test's 2 s for the stages that keep the transfer. On a busy machine they check less, but they can't fail wrongly.running.rs'sasked.elapsed() < 1 s("no second wait"): an upper bound on how long GPUI's own quit takes, not a wait for the core. It held in every run.network.rs'sthe_monitor_reports_the_network_at_once(5 s): it waits for the system's network monitor, not the core. It is built withoutsnapshot, where the window tests' helper doesn't exist. It held in every run.notifications.rs'sthe_badge_counts_a_chat_again_when_its_mute_ends: it needs less than 30 ms between setting a mute and counting the badge. That is a different kind of real-time dependency, and it passed every load run. It is left for its own issue.QUITTING_WITHIN, notifications'WAIT, running'sWITHINandCONNECT_WITHIN): unchanged.How it was tested
make format && make check, on the head merged with main (through A reply or edit ends, as on Esc, when its chat can no longer be written in #306):cargo fmt --check: passes.cargo clippy --all-targets -q -- -D warnings: passes.cargo clippy --all-targets --features hush-desktop/snapshot -q -- -D warnings: passes.cargo test --features hush-desktop/snapshot -q: desktop 405 passed; sig-core 554 passed, 4 ignored.layout.rsfix.yes(load average 96 to 196):events::tests::failures_in_a_row_show_as_one_notice_answered_by_a_later_resetfailed in them. That test's fixedNOONtimestamp lands on 23:59 local time there, so its minutes cross midnight. No real time zone has that offset, and the test's own comment covers the real ones. Every other test passed in those runs.Closes #307