diff options
Diffstat (limited to 'internal/gitaly/service/smarthttp/upload_pack_test.go')
-rw-r--r-- | internal/gitaly/service/smarthttp/upload_pack_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/gitaly/service/smarthttp/upload_pack_test.go b/internal/gitaly/service/smarthttp/upload_pack_test.go index a7b9e4c61..123b0a816 100644 --- a/internal/gitaly/service/smarthttp/upload_pack_test.go +++ b/internal/gitaly/service/smarthttp/upload_pack_test.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "path/filepath" + "sync" "testing" "github.com/prometheus/client_golang/prometheus" @@ -588,8 +589,13 @@ func makePostUploadPackWithSidechannelRequest(ctx context.Context, t *testing.T, responseBuffer := &bytes.Buffer{} ctxOut, waiter := sidechannel.RegisterSidechannel(ctx, registry, func(sideConn *sidechannel.ClientConn) error { + var wg sync.WaitGroup + defer wg.Wait() + + wg.Add(1) errC := make(chan error, 1) go func() { + defer wg.Done() _, err := io.Copy(responseBuffer, sideConn) errC <- err }() |