Skip to content

Commit 8aaca49

Browse files
dmitshurgopherbot
authored andcommitted
internal/task: delete constant timeouts to deflake tests
The motivation is the same as described in the commit message of https://go.dev/cl/504495. For golang/go#64110. Fixes golang/go#66282. Change-Id: I21bb9b9fd5934dc4ac30da671d7c3e913824d2c6 Reviewed-on: https://go-review.googlesource.com/c/build/+/585421 Reviewed-by: Roland Shoemaker <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent a3ddeac commit 8aaca49

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

internal/task/privx_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"reflect"
1313
"strings"
1414
"testing"
15-
"time"
1615

1716
"golang.org/x/build/gerrit"
1817
"golang.org/x/build/internal/workflow"
@@ -123,9 +122,7 @@ echo`), 0777); err != nil {
123122
if err != nil {
124123
t.Fatal(err)
125124
}
126-
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
127-
defer cancel()
128-
_, err = w.Run(ctx, &verboseListener{t: t})
125+
_, err = w.Run(context.Background(), &verboseListener{t: t})
129126
if err != nil {
130127
t.Fatal(err)
131128
}

internal/task/sync_private_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"strings"
66
"testing"
7-
"time"
87

98
"golang.org/x/build/internal/workflow"
109
)
@@ -30,9 +29,7 @@ func TestSyncPrivate(t *testing.T) {
3029
if err != nil {
3130
t.Fatal(err)
3231
}
33-
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
34-
defer cancel()
35-
_, err = w.Run(ctx, &verboseListener{t: t})
32+
_, err = w.Run(context.Background(), &verboseListener{t: t})
3633
if err != nil {
3734
t.Fatal(err)
3835
}

internal/task/updateproxytestrepo_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"context"
99
"fmt"
1010
"testing"
11-
"time"
1211

1312
"golang.org/x/build/internal/workflow"
1413
)
@@ -44,8 +43,7 @@ func TestUpdateProxyTestRepo(t *testing.T) {
4443
Branch: "master",
4544
}
4645

47-
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
48-
defer cancel()
46+
ctx := context.Background()
4947
if _, err := upgradeGoVersion.UpdateProxyTestRepo(&workflow.TaskContext{Context: ctx}, Published{Version: "go" + tt.new}); err != nil {
5048
t.Fatal(err)
5149
}

0 commit comments

Comments
 (0)