From 6ba55213fb5bf192d8ad091a5c708b5f7019589c Mon Sep 17 00:00:00 2001 From: Spike Curtis Date: Thu, 7 Aug 2025 16:40:38 +0400 Subject: [PATCH] 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. --- agent/agentssh/x11_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/agentssh/x11_test.go b/agent/agentssh/x11_test.go index 83af8a2f83..2f2c657f65 100644 --- a/agent/agentssh/x11_test.go +++ b/agent/agentssh/x11_test.go @@ -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()