Skip to content

Commit 47ed79f

Browse files
authored
fix: replace context.Done() with Wait() in backend tests (#75)
Replace ctx.Done() with proper Wait() method calls in proxy and transparent backend tests to ensure proper cleanup and synchronization.
1 parent a0da4a8 commit 47ed79f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/backend/proxy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func TestProxyBackendRun(t *testing.T) {
8585

8686
checkCh := make(chan struct{})
8787
go func() {
88-
<-ctx.Done()
88+
pb.Wait()
8989
close(checkCh)
9090
}()
9191

pkg/backend/transparent_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func TestTransparentBackendRun(t *testing.T) {
114114

115115
checkCh := make(chan struct{})
116116
go func() {
117-
<-ctx.Done()
117+
be.Wait()
118118
close(checkCh)
119119
}()
120120

0 commit comments

Comments
 (0)