@@ -15,13 +15,14 @@ import (
15
15
"github.com/coder/coder/agent"
16
16
"github.com/coder/coder/coderd/httpapi"
17
17
"github.com/coder/coder/codersdk"
18
+ "github.com/coder/coder/testutil"
18
19
)
19
20
20
21
func TestAppHealth (t * testing.T ) {
21
22
t .Parallel ()
22
23
t .Run ("Healthy" , func (t * testing.T ) {
23
24
t .Parallel ()
24
- ctx , cancel := context .WithTimeout (context .Background (), 5 * time . Second )
25
+ ctx , cancel := context .WithTimeout (context .Background (), testutil . WaitLong )
25
26
defer cancel ()
26
27
apps := []codersdk.WorkspaceApp {
27
28
{
@@ -58,12 +59,12 @@ func TestAppHealth(t *testing.T) {
58
59
}
59
60
60
61
return apps [1 ].Health == codersdk .WorkspaceAppHealthHealthy
61
- }, 5 * time . Second , 1 * time . Second )
62
+ }, testutil . WaitLong , testutil . IntervalSlow )
62
63
})
63
64
64
65
t .Run ("500" , func (t * testing.T ) {
65
66
t .Parallel ()
66
- ctx , cancel := context .WithTimeout (context .Background (), 10 * time . Second )
67
+ ctx , cancel := context .WithTimeout (context .Background (), testutil . WaitLong )
67
68
defer cancel ()
68
69
apps := []codersdk.WorkspaceApp {
69
70
{
@@ -91,7 +92,7 @@ func TestAppHealth(t *testing.T) {
91
92
}
92
93
93
94
return apps [0 ].Health == codersdk .WorkspaceAppHealthUnhealthy
94
- }, 10 * time . Second , 1 * time . Second )
95
+ }, testutil . WaitLong , testutil . IntervalSlow )
95
96
})
96
97
97
98
t .Run ("Timeout" , func (t * testing.T ) {
0 commit comments