diff options
author | Quang-Minh Nguyen <qmnguyen@gitlab.com> | 2023-08-23 11:06:13 +0300 |
---|---|---|
committer | Quang-Minh Nguyen <qmnguyen@gitlab.com> | 2023-08-29 15:18:22 +0300 |
commit | be6118987f8c82d28ba3e380ebb7e08ffbcb7c8a (patch) | |
tree | 82b90a872554898f95a4e405cf9382522bc3a2ac | |
parent | 435b07845a6998a6b35381bc28ffaeff5e478b1d (diff) |
WIP: Fix TestServerPostUploadPack_gitConfigOptions flakeqmnguyen0711/fix-TestServer_PostUploadPackSidechannel-flaky-test
-rw-r--r-- | internal/gitaly/service/smarthttp/upload_pack_test.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/gitaly/service/smarthttp/upload_pack_test.go b/internal/gitaly/service/smarthttp/upload_pack_test.go index 032caacfa..467a37872 100644 --- a/internal/gitaly/service/smarthttp/upload_pack_test.go +++ b/internal/gitaly/service/smarthttp/upload_pack_test.go @@ -106,12 +106,6 @@ func TestServer_PostUploadPackSidechannel_gitConfigOptions(t *testing.T) { } func testServerPostUploadPackGitConfigOptions(t *testing.T, ctx context.Context, makeRequest requestMaker, opts ...testcfg.Option) { - testhelper.SkipQuarantinedTest( - t, - "https://gitlab.com/gitlab-org/gitaly/-/issues/5027", - "TestServer_PostUploadPackSidechannel_gitConfigOptions/no_config_options", - ) - cfg := testcfg.Build(t, opts...) testcfg.BuildGitalyHooks(t, cfg) @@ -505,9 +499,11 @@ func makePostUploadPackWithSidechannelRequest(t *testing.T, ctx context.Context, var wg sync.WaitGroup defer wg.Wait() + clientDone := make(chan struct{}) wg.Add(1) errC := make(chan error, 1) go func() { + <-clientDone defer wg.Done() _, err := io.Copy(responseBuffer, sideConn) errC <- err @@ -522,6 +518,7 @@ func makePostUploadPackWithSidechannelRequest(t *testing.T, ctx context.Context, if err := sideConn.CloseWrite(); err != nil { return err } + close(clientDone) return <-errC }) |