Skip to content

Commit 92dfb52

Browse files
authored
chore: bump test timeout for acceptance tests (#82)
With heavy parallel tests the teardown function in acceptance tests will fail. This commit adds a custom timeout. Signed-off-by: Ville Vesilehto <ville.vesilehto@upcloud.com>
1 parent c2ecca1 commit 92dfb52

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

builder/upcloud/builder_acc_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"regexp"
1212
"strings"
1313
"testing"
14+
"time"
1415

1516
"github.com/hashicorp/packer-plugin-sdk/acctest"
1617

@@ -21,6 +22,8 @@ import (
2122

2223
// Run tests: PACKER_ACC=1 go test -count 1 -v ./... -timeout=120m
2324

25+
const defaultTestTimeout = 15 * time.Minute
26+
2427
// json
2528

2629
//go:embed test-fixtures/json/basic.json
@@ -261,7 +264,7 @@ func teardown(t *testing.T, testName string) func() error {
261264
drv := driver.NewDriver(&driver.DriverConfig{
262265
Username: driver.UsernameFromEnv(),
263266
Password: driver.PasswordFromEnv(),
264-
Timeout: DefaultTimeout,
267+
Timeout: defaultTestTimeout,
265268
})
266269

267270
for _, u := range uuids {

0 commit comments

Comments
 (0)