detached c4d9299

Merge pull request 'test: fix two flaky tests seen in CI' (#19) from fix/flaky-tests into main

Reviewed-on: https://git.bnema.dev/bnema/neferwl/pulls/19
commit
c4d9299ce9fb1d381f7c849787c002fee3fd6ac9
author
bnema · · 2026-10-08 12:12 UTC
merge of
4fd770d + b5f665e · diff against the first parent
signature
unsigned
2 files · +18 -5
M internal/adapters/config/watch_test.go +14 -4
@@ -81,10 +81,20 @@ func TestWatch(t *testing.T) {
8181 time.Sleep(15 * time.Millisecond)
8282 }
8383 receive("#00ff00")
84- select {
85- case <-out:
86- t.Fatal("duplicate reload")
87- case <-time.After(250 * time.Millisecond):
84+ // A loaded machine may pause past the debounce inside the burst
85+ // and reload the truncated file in between: that is a change, not a
86+ // duplicate. Only the same config sent twice in a row is one.
87+ prev := "#00ff00"
88+ for quiet := false; !quiet; {
89+ select {
90+ case c := <-out:
91+ if c.Config.Background.Color == prev {
92+ t.Fatal("duplicate reload")
93+ }
94+ prev = c.Config.Background.Color
95+ case <-time.After(250 * time.Millisecond):
96+ quiet = true
97+ }
8898 }
8999 // An invalid value keeps the default for that key; other keys still apply.
90100 write(path, "background = bad\nborder.width = 5\n")
@@ -81,10 +81,20 @@ func TestWatch(t *testing.T) {
81 time.Sleep(15 * time.Millisecond)81 time.Sleep(15 * time.Millisecond)
82 }82 }
83 receive("#00ff00")83 receive("#00ff00")
84- select {84+ // A loaded machine may pause past the debounce inside the burst
85- case <-out:85+ // and reload the truncated file in between: that is a change, not a
86- t.Fatal("duplicate reload")86+ // duplicate. Only the same config sent twice in a row is one.
87- case <-time.After(250 * time.Millisecond):87+ prev := "#00ff00"
88+ for quiet := false; !quiet; {
89+ select {
90+ case c := <-out:
91+ if c.Config.Background.Color == prev {
92+ t.Fatal("duplicate reload")
93+ }
94+ prev = c.Config.Background.Color
95+ case <-time.After(250 * time.Millisecond):
96+ quiet = true
97+ }
88 }98 }
89 // An invalid value keeps the default for that key; other keys still apply.99 // An invalid value keeps the default for that key; other keys still apply.
90 write(path, "background = bad\nborder.width = 5\n")100 write(path, "background = bad\nborder.width = 5\n")
M internal/adapters/wayland/activation_test.go +4 -1
@@ -163,8 +163,11 @@ func TestActivationPressSerial(t *testing.T) {
163163 token = newToken(t, c, manager, serial+100, seat)
164164 requestProtocol(t, c, manager, xdgactivation.ActivationV1RequestActivate, token, surf)
165165 noActivation(t, c, events)
166- // The focus moved after the press: stale.
166+ // The focus moved after the press: stale. Wait for each step: the
167+ // focus starts at 0, so a single wait could pass before either
168+ // command applies and leave the client focused.
167169 commands <- ports.FocusWindow{ID: w.ID}
170+ waitFocus(t, s, w.ID)
168171 commands <- ports.FocusWindow{}
169172 waitFocus(t, s, 0)
170173 token = newToken(t, c, manager, serial, seat)
@@ -163,8 +163,11 @@ func TestActivationPressSerial(t *testing.T) {
163 token = newToken(t, c, manager, serial+100, seat)163 token = newToken(t, c, manager, serial+100, seat)
164 requestProtocol(t, c, manager, xdgactivation.ActivationV1RequestActivate, token, surf)164 requestProtocol(t, c, manager, xdgactivation.ActivationV1RequestActivate, token, surf)
165 noActivation(t, c, events)165 noActivation(t, c, events)
166- // The focus moved after the press: stale.166+ // The focus moved after the press: stale. Wait for each step: the
167+ // focus starts at 0, so a single wait could pass before either
168+ // command applies and leave the client focused.
167 commands <- ports.FocusWindow{ID: w.ID}169 commands <- ports.FocusWindow{ID: w.ID}
170+ waitFocus(t, s, w.ID)
168 commands <- ports.FocusWindow{}171 commands <- ports.FocusWindow{}
169 waitFocus(t, s, 0)172 waitFocus(t, s, 0)
170 token = newToken(t, c, manager, serial, seat)173 token = newToken(t, c, manager, serial, seat)

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 26

Tags 10

↑↓ moveenter openesc close