Merge pull request #114072 from Tal-or/deflake_e2e_cpumanager_metrics_tests

e2e: cpumanager: proper test clean-up
This commit is contained in:
Kubernetes Prow Robot 2022-12-14 11:55:45 -08:00 committed by GitHub
commit 770b39c65b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -594,6 +594,12 @@ func runCPUManagerTests(f *framework.Framework) {
err = e2epod.NewPodClient(f).MatchContainerOutput(pod.Name, pod.Spec.Containers[0].Name, expAllowedCPUsListRegex)
framework.ExpectNoError(err, "expected log not found in container [%s] of pod [%s]",
pod.Spec.Containers[0].Name, pod.Name)
deletePodSyncByName(f, pod.Name)
// we need to wait for all containers to really be gone so cpumanager reconcile loop will not rewrite the cpu_manager_state.
// this is in turn needed because we will have an unavoidable (in the current framework) race with the
// reconcile loop which will make our attempt to delete the state file and to restore the old config go haywire
waitForAllContainerRemoval(pod.Name, pod.Namespace)
})
ginkgo.It("should assign CPUs as expected with enhanced policy based on strict SMT alignment", func(ctx context.Context) {