diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index d2696ff9e1d..67ac363e72e 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -1,8 +1,6 @@ cluster/images/etcd/migrate pkg/controller/replicaset pkg/kubelet/dockershim -test/integration/garbagecollector -test/integration/scheduler_perf vendor/k8s.io/apimachinery/pkg/api/apitesting/roundtrip vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation vendor/k8s.io/apimachinery/pkg/runtime/serializer/json diff --git a/test/integration/garbagecollector/garbage_collector_test.go b/test/integration/garbagecollector/garbage_collector_test.go index 63e85f7d7dd..6314fe72db5 100644 --- a/test/integration/garbagecollector/garbage_collector_test.go +++ b/test/integration/garbagecollector/garbage_collector_test.go @@ -598,6 +598,7 @@ func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet } orphan := false switch { + //lint:file-ignore SA1019 Keep testing deprecated OrphanDependents option until it's being removed case options.OrphanDependents == nil && options.PropagationPolicy == nil && len(initialFinalizers) == 0: // if there are no deletion options, the default policy for replication controllers is orphan orphan = true @@ -1024,12 +1025,7 @@ func TestBlockingOwnerRefDoesBlock(t *testing.T) { // dependency graph before handling the foreground deletion of the rc. ctx.startGC(5) timeout := make(chan struct{}) - go func() { - select { - case <-time.After(5 * time.Second): - close(timeout) - } - }() + time.AfterFunc(5*time.Second, func() { close(timeout) }) if !cache.WaitForCacheSync(timeout, gc.IsSynced) { t.Fatalf("failed to wait for garbage collector to be synced") } diff --git a/test/integration/scheduler_perf/scheduler_perf_legacy_test.go b/test/integration/scheduler_perf/scheduler_perf_legacy_test.go index f482034ab50..7d823e2829e 100644 --- a/test/integration/scheduler_perf/scheduler_perf_legacy_test.go +++ b/test/integration/scheduler_perf/scheduler_perf_legacy_test.go @@ -439,6 +439,7 @@ func benchmarkScheduling(numExistingPods, minPods int, testPodStrategy testutils.TestPodCreateStrategy, b *testing.B) { if b.N < minPods { + //lint:ignore SA3001 Set a minimum for b.N to get more meaningful results b.N = minPods } finalFunc, podInformer, clientset := mustSetupScheduler() @@ -498,7 +499,7 @@ func benchmarkScheduling(numExistingPods, minPods int, b.StopTimer() } -// makeBasePodWithSecrets creates a Pod object to be used as a template. +// makeBasePodWithSecret creates a Pod object to be used as a template. // The pod uses a single Secrets volume. func makeBasePodWithSecret() *v1.Pod { basePod := &v1.Pod{