mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-03 08:04:45 +00:00
pkg/util/workqueue/delaying_queue: export contructor with custom clock
Kubernetes-commit: 638c02f6cdb4e269f46b60fe1f91e553cfc59749
This commit is contained in:
committed by
Kubernetes Publisher
parent
d1b30110f1
commit
d81654af9d
@@ -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++ {
|
||||
|
Reference in New Issue
Block a user