test: fix timeout on TestServer_X11_EvictionLRU (#19217)

fixes https://github.com/coder/internal/issues/878

On my dev system it takes 900ms, but looking at timestamps in CI it took
25 seconds. Bumping timeout to 60s.

Also fixes the segfault.
This commit is contained in:
Spike Curtis
2025-08-07 16:40:38 +04:00
committed by GitHub
parent 2851d9f3ea
commit 6ba55213fb
+4 -2
View File
@@ -135,7 +135,7 @@ func TestServer_X11_EvictionLRU(t *testing.T) {
t.Skip("X11 forwarding is only supported on Linux")
}
ctx := testutil.Context(t, testutil.WaitLong)
ctx := testutil.Context(t, testutil.WaitSuperLong)
logger := testutil.Logger(t)
fs := afero.NewMemMapFs()
@@ -238,7 +238,9 @@ func TestServer_X11_EvictionLRU(t *testing.T) {
payload := "hello world"
go func() {
conn, err := inproc.Dial(ctx, testutil.NewAddr("tcp", fmt.Sprintf("localhost:%d", agentssh.X11StartPort+agentssh.X11DefaultDisplayOffset)))
assert.NoError(t, err)
if !assert.NoError(t, err) {
return
}
_, err = conn.Write([]byte(payload))
assert.NoError(t, err)
_ = conn.Close()