Skip to content

Commit e4a6802

Browse files
authored
Merge pull request #39 from UpCloudLtd/reduce-parallel-tests-to-run
Reduce parallel test amount from 2 to 8
2 parents 0500aae + 46bff95 commit e4a6802

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ go:
55
- 1.8
66
- 1.9
77

8-
script: travis_retry go test ./... -v -parallel 8
8+
script: travis_wait 20 go test ./... -v -parallel 10 -timeout 60m

upcloud/service/service_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var svc *Service
1818
// TestMain is the main test method
1919
func TestMain(m *testing.M) {
2020
setup()
21-
retCode := m.Run()
21+
retCode := m.Run()
2222

2323
// Optionally perform teardown
2424
deleteResources := os.Getenv("UPCLOUD_GO_SDK_TEST_DELETE_RESOURCES")
@@ -35,7 +35,7 @@ func setup() {
3535
user, password := getCredentials()
3636

3737
c := client.New(user, password)
38-
c.SetTimeout(time.Second * 30)
38+
c.SetTimeout(time.Second * 300)
3939
svc = New(c)
4040
}
4141

@@ -51,7 +51,7 @@ func teardown() {
5151
serverDetails, err := svc.WaitForServerState(&request.WaitForServerStateRequest{
5252
UUID: server.UUID,
5353
UndesiredState: upcloud.ServerStateMaintenance,
54-
Timeout: time.Minute * 5,
54+
Timeout: time.Minute * 15,
5555
})
5656
handleError(err)
5757

@@ -80,7 +80,7 @@ func teardown() {
8080
_, err = svc.WaitForStorageState(&request.WaitForStorageStateRequest{
8181
UUID: storage.UUID,
8282
DesiredState: upcloud.StorageStateOnline,
83-
Timeout: time.Minute * 5,
83+
Timeout: time.Minute * 15,
8484
})
8585
handleError(err)
8686
}
@@ -151,7 +151,7 @@ func TestCreateModifyDeleteServer(t *testing.T) {
151151
serverDetails, err = svc.WaitForServerState(&request.WaitForServerStateRequest{
152152
UUID: serverDetails.UUID,
153153
DesiredState: upcloud.ServerStateStarted,
154-
Timeout: time.Minute * 5,
154+
Timeout: time.Minute * 15,
155155
})
156156

157157
handleError(err)
@@ -647,7 +647,7 @@ func createServer(name string) *upcloud.ServerDetails {
647647
serverDetails, err = svc.WaitForServerState(&request.WaitForServerStateRequest{
648648
UUID: serverDetails.UUID,
649649
DesiredState: upcloud.ServerStateStarted,
650-
Timeout: time.Minute * 5,
650+
Timeout: time.Minute * 15,
651651
})
652652

653653
handleError(err)
@@ -659,7 +659,7 @@ func createServer(name string) *upcloud.ServerDetails {
659659
func stopServer(uuid string) {
660660
serverDetails, err := svc.StopServer(&request.StopServerRequest{
661661
UUID: uuid,
662-
Timeout: time.Minute * 5,
662+
Timeout: time.Minute * 15,
663663
StopType: request.ServerStopTypeHard,
664664
})
665665

@@ -668,7 +668,7 @@ func stopServer(uuid string) {
668668
serverDetails, err = svc.WaitForServerState(&request.WaitForServerStateRequest{
669669
UUID: serverDetails.UUID,
670670
DesiredState: upcloud.ServerStateStopped,
671-
Timeout: time.Minute * 5,
671+
Timeout: time.Minute * 15,
672672
})
673673

674674
handleError(err)
@@ -734,7 +734,7 @@ func waitForStorageOnline(uuid string) {
734734
_, err := svc.WaitForStorageState(&request.WaitForStorageStateRequest{
735735
UUID: uuid,
736736
DesiredState: upcloud.StorageStateOnline,
737-
Timeout: time.Minute * 5,
737+
Timeout: time.Minute * 15,
738738
})
739739

740740
handleError(err)

0 commit comments

Comments
 (0)