Skip to content

Commit

Permalink
fix clock per linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sethsaperstein-lyft committed Nov 14, 2023
1 parent 3996332 commit 94a6975
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/flink/client/error_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/lyft/flinkk8soperator/pkg/apis/app/v1beta1"

"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/utils/clock"
)

// appError codes
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/flink/client/error_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"k8s.io/apimachinery/pkg/util/clock"
clockTesting "k8s.io/utils/clock/testing"

"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -63,7 +63,7 @@ func TestRetryHandler_IsTimeToRetry(t *testing.T) {
retryer := getTestRetryer()
currTime := metav1.NewTime(time.Now())
olderTime := currTime.Add(-5 * time.Second)
fakeClock := clock.NewFakeClock(currTime.Time)
fakeClock := clockTesting.NewFakeClock(currTime.Time)
fakeClock.SetTime(time.Now())
// Set retry count to 0 to keep retry delay small
assert.True(t, retryer.IsTimeToRetry(fakeClock, olderTime, 0))
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/flink/mock/mock_error_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mock
import (
"time"

"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/utils/clock"
)

type IsErrorRetryableFunc func(err error) bool
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/flinkapplication/flink_state_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/lyft/flytestdlib/promutils/labeled"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/utils/clock"
)

const (
Expand Down

0 comments on commit 94a6975

Please sign in to comment.