Skip to content

Commit 3d1095c

Browse files
committed
Fix TestShutdownTimeout
1 parent 507762a commit 3d1095c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/omni/goroutine_leak_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ func TestShutdownTimeout(t *testing.T) {
173173

174174
// Shutdown with very short timeout
175175
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Millisecond)
176+
defer cancel()
176177
err = logger.Shutdown(ctx)
177-
cancel()
178178

179179
// Should get timeout error since channel is full and processing takes time
180180
if err == nil || err != context.DeadlineExceeded {

0 commit comments

Comments
 (0)