Unify queue constructors, deprecate current constructors

Kubernetes-commit: fea83b78243c77e81b91f3f0a812979809aeacaf
This commit is contained in:
austin ce
2023-03-10 17:46:26 -05:00
committed by Kubernetes Publisher
parent 9668243c04
commit 66fa9d308f
6 changed files with 154 additions and 89 deletions

View File

@@ -171,7 +171,12 @@ func TestMetrics(t *testing.T) {
mp := testMetricsProvider{}
t0 := time.Unix(0, 0)
c := testingclock.NewFakeClock(t0)
q := newNamedQueueWithCustomClock(c, "test", time.Millisecond, WithMetricsProvider(&mp))
config := QueueConfig{
Name: "test",
Clock: c,
MetricsProvider: &mp,
}
q := newQueueWithConfig(config, time.Millisecond)
defer q.ShutDown()
for !c.HasWaiters() {
// Wait for the go routine to call NewTicker()