detached 534f575

test(wayland): wait for the resume configure in TestPresentationFeedback

commit
534f575ea7c7185d94d65beff0b85278ac2ad87b
author
brice · · 2026-10-02 10:42 UTC
parent
0b4c780
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +14 -2
M internal/adapters/wayland/presentation_test.go +14 -2
@@ -166,8 +166,20 @@ func TestPresentationFeedback(t *testing.T) {
166166 t.Fatalf("hidden feedback: %+v", ev)
167167 }
168168 commands <- ports.ConfigureWindow{ID: w.ID, Width: 100, Height: 100, Output: "HEADLESS-1", Visible: true}
169- // Synchronize the resume before committing the next feedback.
170- s.display.Do(func() {})
169+ // Wait for the resume before committing the next feedback: the command
170+ // goroutine applies it in its own display round trip, which an empty Do
171+ // here may overtake.
172+ for deadline := time.Now().Add(2 * time.Second); ; {
173+ var visible bool
174+ s.display.Do(func() { visible = s.windows[w.ID].last.Visible })
175+ if visible {
176+ break
177+ }
178+ if time.Now().After(deadline) {
179+ t.Fatal("resume not applied")
180+ }
181+ time.Sleep(2 * time.Millisecond)
182+ }
171183 // Presented with the flip's time, counter and flags.
172184 a := feedback()
173185 commit()
@@ -166,8 +166,20 @@ func TestPresentationFeedback(t *testing.T) {
166 t.Fatalf("hidden feedback: %+v", ev)166 t.Fatalf("hidden feedback: %+v", ev)
167 }167 }
168 commands <- ports.ConfigureWindow{ID: w.ID, Width: 100, Height: 100, Output: "HEADLESS-1", Visible: true}168 commands <- ports.ConfigureWindow{ID: w.ID, Width: 100, Height: 100, Output: "HEADLESS-1", Visible: true}
169- // Synchronize the resume before committing the next feedback.169+ // Wait for the resume before committing the next feedback: the command
170- s.display.Do(func() {})170+ // goroutine applies it in its own display round trip, which an empty Do
171+ // here may overtake.
172+ for deadline := time.Now().Add(2 * time.Second); ; {
173+ var visible bool
174+ s.display.Do(func() { visible = s.windows[w.ID].last.Visible })
175+ if visible {
176+ break
177+ }
178+ if time.Now().After(deadline) {
179+ t.Fatal("resume not applied")
180+ }
181+ time.Sleep(2 * time.Millisecond)
182+ }
171 // Presented with the flip's time, counter and flags.183 // Presented with the flip's time, counter and flags.
172 a := feedback()184 a := feedback()
173 commit()185 commit()

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 23

Tags 10

↑↓ moveenter openesc close