Migratet to k8s.io/utils/clock in workqueue

Kubernetes-commit: 392292ba81964e6ee7badec360a800b1f8645f2f
This commit is contained in:
wojtekt
2021-09-09 16:38:59 +02:00
committed by Kubernetes Publisher
parent a5f006eba4
commit 14a51589c3
6 changed files with 18 additions and 18 deletions

View File

@@ -23,12 +23,12 @@ import (
"testing"
"time"
"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/apimachinery/pkg/util/wait"
testingclock "k8s.io/utils/clock/testing"
)
func TestSimpleQueue(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
fakeClock := testingclock.NewFakeClock(time.Now())
q := NewDelayingQueueWithCustomClock(fakeClock, "")
first := "foo"
@@ -70,7 +70,7 @@ func TestSimpleQueue(t *testing.T) {
}
func TestDeduping(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
fakeClock := testingclock.NewFakeClock(time.Now())
q := NewDelayingQueueWithCustomClock(fakeClock, "")
first := "foo"
@@ -129,7 +129,7 @@ func TestDeduping(t *testing.T) {
}
func TestAddTwoFireEarly(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
fakeClock := testingclock.NewFakeClock(time.Now())
q := NewDelayingQueueWithCustomClock(fakeClock, "")
first := "foo"
@@ -178,7 +178,7 @@ func TestAddTwoFireEarly(t *testing.T) {
}
func TestCopyShifting(t *testing.T) {
fakeClock := clock.NewFakeClock(time.Now())
fakeClock := testingclock.NewFakeClock(time.Now())
q := NewDelayingQueueWithCustomClock(fakeClock, "")
first := "foo"
@@ -216,7 +216,7 @@ func TestCopyShifting(t *testing.T) {
}
func BenchmarkDelayingQueue_AddAfter(b *testing.B) {
fakeClock := clock.NewFakeClock(time.Now())
fakeClock := testingclock.NewFakeClock(time.Now())
q := NewDelayingQueueWithCustomClock(fakeClock, "")
// Add items