Skip to content

Commit 133e0d8

Browse files
committed
[test] don't wait for workspace stop with git_test.go, we're testing git actions.
Why? We miss state transitions, it's not guaranteed each one will be returned, and there are other tests waiting. For example, in the below log, we miss INITIALIZING, RUNNING, and STOPPING. workspace.go:369: attempt to create the workspace as user 0565bb3c-e724-4da9-84fb-22e2a7b23b8c, with context github.com/gitpod-io/gitpod-test-repo/tree/integration-test/commit workspace.go:411: attempt to get the workspace information: gitpodio-gitpodtestrepo-nscsowy1njb workspace.go:423: not preparing workspace.go:432: got the workspace information: gitpodio-gitpodtestrepo-nscsowy1njb workspace.go:460: wait for workspace to be fully up and running workspace.go:569: prepare for a connection with ws-manager workspace.go:590: established for a connection with ws-manager workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, PENDING workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, PENDING workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e workspace.go:504: waiting for stopping the workspace: 462f1325-3019-4547-8666-508e8353335e workspace.go:514: attemp to delete the workspace: 462f1325-3019-4547-8666-508e8353335e workspace.go:797: confirmed the worksapce is stopped: 462f1325-3019-4547-8666-508e8353335e, STOPPED workspace.go:538: successfully terminated workspace git_test.go:172: failed to wait for the workspace to start up: cannot wait for workspace: context deadline exceeded
1 parent 2f217f8 commit 133e0d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/tests/workspace/git_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func TestGitActions(t *testing.T) {
178178
sapi := integration.NewComponentAPI(sctx, cfg.Namespace(), kubeconfig, cfg.Client())
179179
defer sapi.Done(t)
180180

181-
_, err := stopWs(true, sapi)
181+
_, err := stopWs(false, sapi)
182182
if err != nil {
183183
t.Fatal(err)
184184
}
@@ -196,6 +196,7 @@ func TestGitActions(t *testing.T) {
196196
if err != nil {
197197
t.Fatal(err)
198198
}
199+
t.Log("test finished successfully")
199200
})
200201
}
201202
}

0 commit comments

Comments
 (0)