Skip to content

Commit

Permalink
Merge pull request #105849 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-105842

release-23.1: sqlproxyccl: deflake TestResume
  • Loading branch information
jeffswenson authored Jun 30, 2023
2 parents da06771 + fa8fe73 commit 7b9753c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/ccl/sqlproxyccl/tenant/directory_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ func TestCancelLookups(t *testing.T) {
func TestResume(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.ScopeWithoutShowLogs(t).Close(t)
skip.UnderDeadlockWithIssue(t, 71365)

tenantID := roachpb.MustMakeTenantID(40)
const lookupCount = 5
Expand All @@ -437,12 +436,15 @@ func TestResume(t *testing.T) {
}(i)
}

var processes map[net.Addr]*tenantdirsvr.Process
// Eventually the tenant process will be resumed.
require.Eventually(t, func() bool {
var processes map[net.Addr]*tenantdirsvr.Process
testutils.SucceedsSoon(t, func() error {
processes = tds.Get(tenantID)
return len(processes) == 1
}, 10*time.Second, 100*time.Millisecond)
if len(processes) != 1 {
return errors.Newf("expected 1 processes found %d", len(processes))
}
return nil
})

// Wait until background goroutines complete.
wait.Wait()
Expand Down

0 comments on commit 7b9753c

Please sign in to comment.