cleanup: import from k8s.io/utils/clock/testing instead
Signed-off-by: haoyun <yun.hao@daocloud.io>
This commit is contained in:
parent
6484fab1e0
commit
5c2426a7b2
@ -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 (
|
||||
|
@ -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{}{
|
||||
|
2
vendor/k8s.io/apimachinery/pkg/util/wait/wait.go
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/util/wait/wait.go
generated
vendored
@ -24,8 +24,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
"k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/utils/clock"
|
||||
)
|
||||
|
||||
// For any test of the style:
|
||||
|
2
vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go
generated
vendored
2
vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go
generated
vendored
@ -38,7 +38,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
"k8s.io/client-go/pkg/apis/clientauthentication"
|
||||
"k8s.io/client-go/pkg/apis/clientauthentication/install"
|
||||
clientauthenticationv1 "k8s.io/client-go/pkg/apis/clientauthentication/v1"
|
||||
@ -49,6 +48,7 @@ import (
|
||||
"k8s.io/client-go/transport"
|
||||
"k8s.io/client-go/util/connrotation"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/utils/clock"
|
||||
)
|
||||
|
||||
const execInfoEnv = "KUBERNETES_EXEC_INFO"
|
||||
|
2
vendor/k8s.io/client-go/rest/request.go
generated
vendored
2
vendor/k8s.io/client-go/rest/request.go
generated
vendored
@ -39,13 +39,13 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer/streaming"
|
||||
utilclock "k8s.io/apimachinery/pkg/util/clock"
|
||||
"k8s.io/apimachinery/pkg/util/net"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
restclientwatch "k8s.io/client-go/rest/watch"
|
||||
"k8s.io/client-go/tools/metrics"
|
||||
"k8s.io/client-go/util/flowcontrol"
|
||||
"k8s.io/klog/v2"
|
||||
utilclock "k8s.io/utils/clock"
|
||||
)
|
||||
|
||||
var (
|
||||
|
2
vendor/k8s.io/client-go/util/flowcontrol/backoff.go
generated
vendored
2
vendor/k8s.io/client-go/util/flowcontrol/backoff.go
generated
vendored
@ -20,7 +20,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
"k8s.io/utils/clock"
|
||||
"k8s.io/utils/integer"
|
||||
)
|
||||
|
||||
|
2
vendor/k8s.io/client-go/util/workqueue/delaying_queue.go
generated
vendored
2
vendor/k8s.io/client-go/util/workqueue/delaying_queue.go
generated
vendored
@ -21,8 +21,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/utils/clock"
|
||||
)
|
||||
|
||||
// DelayingInterface is an Interface that can Add an item at a later time. This makes it easier to
|
||||
|
2
vendor/k8s.io/client-go/util/workqueue/metrics.go
generated
vendored
2
vendor/k8s.io/client-go/util/workqueue/metrics.go
generated
vendored
@ -20,7 +20,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
"k8s.io/utils/clock"
|
||||
)
|
||||
|
||||
// This file provides abstractions for setting the provider (e.g., prometheus)
|
||||
|
2
vendor/k8s.io/client-go/util/workqueue/queue.go
generated
vendored
2
vendor/k8s.io/client-go/util/workqueue/queue.go
generated
vendored
@ -20,7 +20,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
"k8s.io/utils/clock"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -611,7 +611,7 @@ k8s.io/apimachinery/pkg/runtime/serializer/streaming
|
||||
k8s.io/apimachinery/pkg/runtime/serializer/versioning
|
||||
k8s.io/apimachinery/pkg/selection
|
||||
k8s.io/apimachinery/pkg/types
|
||||
k8s.io/apimachinery/pkg/util/clock
|
||||
k8s.io/utils/clock
|
||||
k8s.io/apimachinery/pkg/util/errors
|
||||
k8s.io/apimachinery/pkg/util/framer
|
||||
k8s.io/apimachinery/pkg/util/httpstream
|
||||
|
Loading…
Reference in New Issue
Block a user