cleanup: import from k8s.io/utils/clock/testing instead

Signed-off-by: haoyun <yun.hao@daocloud.io>
This commit is contained in:
haoyun
2021-09-30 23:34:56 +08:00
parent 6484fab1e0
commit 5c2426a7b2
10 changed files with 11 additions and 11 deletions

View File

@@ -35,7 +35,7 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/utils/clock"
)
const (

View File

@@ -23,13 +23,13 @@ import (
eventtypes "github.com/containerd/containerd/api/events"
"github.com/containerd/typeurl"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/util/clock"
testingclock "k8s.io/utils/clock/testing"
)
// TestBackOff tests the logic of backOff struct.
func TestBackOff(t *testing.T) {
testStartTime := time.Now()
testClock := clock.NewFakeClock(testStartTime)
testClock := testingclock.NewFakeClock(testStartTime)
inputQueues := map[string]*backOffQueue{
"container1": {
events: []interface{}{