Skip to content

Commit 52e3e2c

Browse files
author
k8s-merge-robot
committed
Merge pull request kubernetes#20484 from gmarek/fix-kubemark
Auto commit by PR queue bot
2 parents 251ea32 + e271365 commit 52e3e2c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/e2e/density.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,21 @@ var _ = Describe("Density", func() {
462462
Logf("Approx throughput: %v pods/min",
463463
float64(nodeCount)/(e2eLag[len(e2eLag)-1].Latency.Minutes()))
464464
}
465+
466+
By("Deleting ReplicationController and all additional Pods")
467+
// We explicitly delete all pods to have API calls necessary for deletion accounted in metrics.
468+
rc, err := c.ReplicationControllers(ns).Get(RCName)
469+
if err == nil && rc.Spec.Replicas != 0 {
470+
By("Cleaning up the replication controller")
471+
err := DeleteRC(c, ns, RCName)
472+
expectNoError(err)
473+
}
474+
475+
By("Removing additional pods if any")
476+
for i := 1; i <= nodeCount; i++ {
477+
name := additionalPodsPrefix + "-" + strconv.Itoa(i)
478+
c.Pods(ns).Delete(name, nil)
479+
}
465480
})
466481
}
467482
})

0 commit comments

Comments
 (0)