mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
test(coderd): close metricscache and avoid background context (#7996)
This commit is contained in:
@@ -435,6 +435,7 @@ func TestCache_DeploymentStats(t *testing.T) {
|
||||
cache := metricscache.New(db, slogtest.Make(t, nil), metricscache.Intervals{
|
||||
DeploymentStats: testutil.IntervalFast,
|
||||
})
|
||||
defer cache.Close()
|
||||
|
||||
_, err := db.InsertWorkspaceAgentStat(context.Background(), database.InsertWorkspaceAgentStatParams{
|
||||
ID: uuid.New(),
|
||||
|
||||
Reference in New Issue
Block a user