mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-02 15:45:09 +00:00
Migratet to k8s.io/utils/clock in workqueue
Kubernetes-commit: 392292ba81964e6ee7badec360a800b1f8645f2f
This commit is contained in:
committed by
Kubernetes Publisher
parent
a5f006eba4
commit
14a51589c3
@@ -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
|
||||
|
Reference in New Issue
Block a user