mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
e2e: cpumanager: proper test clean-up
One of the cpumanager tests doesn't remove the pod that got created during the test. This causes pollution of other tests and failures from time to time (depends on the test execution order). In order to defalke the tests, we should delete the pod and wait for it to be completely remove. Signed-off-by: Talor Itzhak <titzhak@redhat.com>
This commit is contained in:
parent
57eb5d631c
commit
56c5a95849
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user