pkg/util/workqueue/delaying_queue: export contructor with custom clock

Kubernetes-commit: 638c02f6cdb4e269f46b60fe1f91e553cfc59749
This commit is contained in:
Jacek Kaniuk
2019-10-23 16:07:38 +02:00
committed by Kubernetes Publisher
parent d1b30110f1
commit d81654af9d
2 changed files with 11 additions and 8 deletions

View File

@@ -29,7 +29,7 @@ import (
func TestSimpleQueue(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
q := newDelayingQueue(fakeClock, "")
q := NewDelayingQueueWithCustomClock(fakeClock, "")
first := "foo"
@@ -71,7 +71,7 @@ func TestSimpleQueue(t *testing.T) {
func TestDeduping(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
q := newDelayingQueue(fakeClock, "")
q := NewDelayingQueueWithCustomClock(fakeClock, "")
first := "foo"
@@ -130,7 +130,7 @@ func TestDeduping(t *testing.T) {
func TestAddTwoFireEarly(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
q := newDelayingQueue(fakeClock, "")
q := NewDelayingQueueWithCustomClock(fakeClock, "")
first := "foo"
second := "bar"
@@ -179,7 +179,7 @@ func TestAddTwoFireEarly(t *testing.T) {
func TestCopyShifting(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
q := newDelayingQueue(fakeClock, "")
q := NewDelayingQueueWithCustomClock(fakeClock, "")
first := "foo"
second := "bar"
@@ -217,7 +217,7 @@ func TestCopyShifting(t *testing.T) {
func BenchmarkDelayingQueue_AddAfter(b *testing.B) {
fakeClock := clock.NewFakeClock(time.Now())
q := newDelayingQueue(fakeClock, "")
q := NewDelayingQueueWithCustomClock(fakeClock, "")
// Add items
for n := 0; n < b.N; n++ {