File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,8 @@ func TestServer(t *testing.T) {
122
122
123
123
const superDuperLong = testutil .WaitSuperLong * 3
124
124
125
- ctx := testutil .Context (t , superDuperLong )
125
+ ctx , cancelFunc := context .WithTimeout (context .Background (), superDuperLong )
126
+ defer cancelFunc ()
126
127
clitest .Start (t , inv .WithContext (ctx ))
127
128
128
129
//nolint:gocritic // Embedded postgres take a while to fire up.
@@ -1460,8 +1461,8 @@ func TestServer(t *testing.T) {
1460
1461
})
1461
1462
}
1462
1463
1463
- //nolint:tparallel,paralleltest // This test spawns or connects to an existing PostgreSQL instance.
1464
1464
func TestServer_Production (t * testing.T ) {
1465
+ t .Parallel ()
1465
1466
if runtime .GOOS != "linux" || testing .Short () {
1466
1467
// Skip on non-Linux because it spawns a PostgreSQL instance.
1467
1468
t .SkipNow ()
@@ -1471,7 +1472,8 @@ func TestServer_Production(t *testing.T) {
1471
1472
defer closeFunc ()
1472
1473
1473
1474
// Postgres + race detector + CI = slow.
1474
- ctx := testutil .Context (t , testutil .WaitSuperLong * 3 )
1475
+ ctx , cancelFunc := context .WithTimeout (context .Background (), testutil .WaitSuperLong * 3 )
1476
+ defer cancelFunc ()
1475
1477
1476
1478
inv , cfg := clitest .New (t ,
1477
1479
"server" ,
You can’t perform that action at this time.
0 commit comments