resolve data race conditions, code quality

This commit is contained in:
David Zhao
2021-06-04 14:57:55 -07:00
parent 5baf97e99b
commit a3228c2ae9
17 changed files with 95 additions and 293 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ var (
func WithTimeout(t *testing.T, description string, f func() bool) bool {
logger.Infow(description)
ctx, _ := context.WithTimeout(context.Background(), ConnectTimeout)
ctx, cancel := context.WithTimeout(context.Background(), ConnectTimeout)
defer cancel()
for {
select {
case <-ctx.Done():