From 80467773f263363ffef8c41201d861d50a9d52c1 Mon Sep 17 00:00:00 2001 From: Takanori Hirano Date: Sun, 24 Aug 2025 17:28:03 +0000 Subject: [PATCH] fix: replace context.Done() with Wait() in backend tests Replace ctx.Done() with proper Wait() method calls in proxy and transparent backend tests to ensure proper cleanup and synchronization. --- pkg/backend/proxy_test.go | 2 +- pkg/backend/transparent_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/backend/proxy_test.go b/pkg/backend/proxy_test.go index 7a201f1..55b35d8 100644 --- a/pkg/backend/proxy_test.go +++ b/pkg/backend/proxy_test.go @@ -85,7 +85,7 @@ func TestProxyBackendRun(t *testing.T) { checkCh := make(chan struct{}) go func() { - <-ctx.Done() + pb.Wait() close(checkCh) }() diff --git a/pkg/backend/transparent_test.go b/pkg/backend/transparent_test.go index db4f415..dc7d041 100644 --- a/pkg/backend/transparent_test.go +++ b/pkg/backend/transparent_test.go @@ -114,7 +114,7 @@ func TestTransparentBackendRun(t *testing.T) { checkCh := make(chan struct{}) go func() { - <-ctx.Done() + be.Wait() close(checkCh) }()