diff --git a/hack/test-all.sh b/hack/test-all.sh index e538e78b63..37e4ec5d3a 100755 --- a/hack/test-all.sh +++ b/hack/test-all.sh @@ -20,18 +20,6 @@ source $(dirname ${BASH_SOURCE})/common.sh header_text "running go test" -# On MacOS there is a strange race condition -# between port allocation of envtest suites when go test -# runs all the tests in parallel without any limits (spins up around 10+ environments). -# -# To avoid flakes, set we're setting the go-test parallel flag to -# to limit the number of parallel executions. -# -# TODO(community): Investigate this behavior further. -if [[ "${OSTYPE}" == "darwin"* ]]; then - P_FLAG="-p=1" -fi - go test -race ${P_FLAG} ${MOD_OPT} ./... if [[ -n ${ARTIFACTS:-} ]]; then diff --git a/pkg/controller/controllerutil/controllerutil.go b/pkg/controller/controllerutil/controllerutil.go index 7863c3deec..13f14a7ed3 100644 --- a/pkg/controller/controllerutil/controllerutil.go +++ b/pkg/controller/controllerutil/controllerutil.go @@ -207,7 +207,7 @@ func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, f M return OperationResultCreated, nil } - existing := obj.DeepCopyObject() //nolint:ifshort + existing := obj.DeepCopyObject() //nolint if err := mutate(f, key, obj); err != nil { return OperationResultNone, err } diff --git a/pkg/internal/testing/controlplane/etcd.go b/pkg/internal/testing/controlplane/etcd.go index 5d6174c77b..c6d6251731 100644 --- a/pkg/internal/testing/controlplane/etcd.go +++ b/pkg/internal/testing/controlplane/etcd.go @@ -174,6 +174,11 @@ func (e *Etcd) defaultArgs() map[string][]string { args["advertise-client-urls"] = []string{e.URL.String()} args["listen-client-urls"] = []string{e.URL.String()} } + + // Add unsafe no fsync, available from etcd 3.5 + if ok, _ := e.processState.CheckFlag("unsafe-no-fsync"); ok { + args["unsafe-no-fsync"] = []string{"true"} + } return args }