Skip to content

Commit efb565b

Browse files
committed
Fix TestZPagesExtensionHost flake after otel-go bump
t.Context() is canceled before t.Cleanup functions run, and the bumped otel/sdk/log BatchProcessor.Shutdown now checks ctx.Err() up front instead of racing on a select, so shutdown deterministically returned context.Canceled. Use context.Background() in cleanup instead, matching the pattern used elsewhere in the codebase. Assisted-by: Claude Sonnet 5
1 parent d4cba71 commit efb565b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/e2e/zpages_host_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package e2e
55

66
import (
7+
"context"
78
"net/http"
89
"testing"
910
"time"
@@ -97,7 +98,7 @@ func TestZPagesExtensionHost(t *testing.T) {
9798
require.NoError(t, err)
9899
require.NoError(t, srv.Start(t.Context()))
99100
t.Cleanup(func() {
100-
require.NoError(t, srv.Shutdown(t.Context()))
101+
require.NoError(t, srv.Shutdown(context.Background()))
101102
})
102103

103104
assert.EventuallyWithT(t, func(c *assert.CollectT) {

0 commit comments

Comments
 (0)