@@ -17,11 +17,11 @@ import (
17
17
"github.com/coder/coder/v2/agent"
18
18
"github.com/coder/coder/v2/agent/agenttest"
19
19
"github.com/coder/coder/v2/agent/proto"
20
- "github.com/coder/coder/v2/clock"
21
20
"github.com/coder/coder/v2/coderd/httpapi"
22
21
"github.com/coder/coder/v2/codersdk"
23
22
"github.com/coder/coder/v2/codersdk/agentsdk"
24
23
"github.com/coder/coder/v2/testutil"
24
+ "github.com/coder/quartz"
25
25
)
26
26
27
27
func TestAppHealth_Healthy (t * testing.T ) {
@@ -69,7 +69,7 @@ func TestAppHealth_Healthy(t *testing.T) {
69
69
httpapi .Write (r .Context (), w , http .StatusOK , nil )
70
70
}),
71
71
}
72
- mClock := clock .NewMock (t )
72
+ mClock := quartz .NewMock (t )
73
73
healthcheckTrap := mClock .Trap ().TickerFunc ("healthcheck" )
74
74
defer healthcheckTrap .Close ()
75
75
reportTrap := mClock .Trap ().TickerFunc ("report" )
@@ -137,7 +137,7 @@ func TestAppHealth_500(t *testing.T) {
137
137
}),
138
138
}
139
139
140
- mClock := clock .NewMock (t )
140
+ mClock := quartz .NewMock (t )
141
141
healthcheckTrap := mClock .Trap ().TickerFunc ("healthcheck" )
142
142
defer healthcheckTrap .Close ()
143
143
reportTrap := mClock .Trap ().TickerFunc ("report" )
@@ -187,7 +187,7 @@ func TestAppHealth_Timeout(t *testing.T) {
187
187
<- r .Context ().Done ()
188
188
}),
189
189
}
190
- mClock := clock .NewMock (t )
190
+ mClock := quartz .NewMock (t )
191
191
start := mClock .Now ()
192
192
193
193
// for this test, it's easier to think in the number of milliseconds elapsed
@@ -235,7 +235,7 @@ func setupAppReporter(
235
235
ctx context.Context , t * testing.T ,
236
236
apps []codersdk.WorkspaceApp ,
237
237
handlers []http.Handler ,
238
- clk clock .Clock ,
238
+ clk quartz .Clock ,
239
239
) (* agenttest.FakeAgentAPI , func ()) {
240
240
closers := []func (){}
241
241
for _ , app := range apps {
0 commit comments