MCPcopy Index your code
hub / github.com/coder/coder / WithTestClock

Function WithTestClock

coderd/notifications/manager.go:70–74  ·  view source on GitHub ↗

WithTestClock is used in testing to set the quartz clock on the manager

(clock quartz.Clock)

Source from the content-addressed store, hash-verified

68
69// WithTestClock is used in testing to set the quartz clock on the manager
70func WithTestClock(clock quartz.Clock) ManagerOption {
71 return func(m *Manager) {
72 m.clock = clock
73 }
74}
75
76// NewManager instantiates a new Manager instance which coordinates notification enqueuing and delivery.
77//

Callers 2

TestPendingUpdatesMetricFunction · 0.92
TestBackpressureFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestPendingUpdatesMetricFunction · 0.74
TestBackpressureFunction · 0.74