Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove e2e test that checked scheduler priority function for spreading of ReplicationController pods #48006

Merged
merged 1 commit into from
Jun 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 0 additions & 46 deletions test/e2e/scheduling/priorities.go
Expand Up @@ -84,52 +84,6 @@ var _ = framework.KubeDescribe("SchedulerPriorities [Serial]", func() {
Expect(err).NotTo(HaveOccurred())
})

It("Pods created by ReplicationController should spread to different node", func() {
By("Create a pod for each node to make the nodes have almost same cpu/mem usage ratio")

createBalancedPodForNodes(f, cs, ns, nodeList.Items, podRequestedResource, 0.6)

By("Create an RC with the same number of replicas as the schedualble nodes. One pod should be scheduled on each node.")
config := testutils.RCConfig{
Client: f.ClientSet,
InternalClient: f.InternalClientset,
Name: "scheduler-priority-selector-spreading",
Namespace: ns,
Image: framework.GetPauseImageName(f.ClientSet),
Replicas: len(nodeList.Items),
CreatedPods: &[]*v1.Pod{},
Labels: map[string]string{"name": "scheduler-priority-selector-spreading"},
CpuRequest: podRequestedResource.Requests.Cpu().MilliValue(),
MemRequest: podRequestedResource.Requests.Memory().Value(),
}
Expect(framework.RunRC(config)).NotTo(HaveOccurred())
// Cleanup the replication controller when we are done.
defer func() {
// Resize the replication controller to zero to get rid of pods.
if err := framework.DeleteRCAndPods(f.ClientSet, f.InternalClientset, f.Namespace.Name, "scheduler-priority-selector-spreading"); err != nil {
framework.Logf("Failed to cleanup replication controller %v: %v.", "scheduler-priority-selector-spreading", err)
}
}()
pods, err := framework.PodsCreated(f.ClientSet, f.Namespace.Name, "scheduler-priority-selector-spreading", int32(len(nodeList.Items)))
Expect(err).NotTo(HaveOccurred())
By("Ensuring each pod is running")

result := map[string]bool{}
for _, pod := range pods.Items {
if pod.DeletionTimestamp != nil {
continue
}
err = f.WaitForPodRunning(pod.Name)
Expect(err).NotTo(HaveOccurred())
result[pod.Spec.NodeName] = true
framework.PrintAllKubeletPods(cs, pod.Spec.NodeName)
}
By("Verify the pods were scheduled to each node")
if len(nodeList.Items) != len(result) {
framework.Failf("Pods are not spread to each node.")
}
})

It("Pod should be prefer scheduled to node that satisify the NodeAffinity", func() {
nodeName := GetNodeThatCanRunPod(f)
By("Trying to apply a label on the found node.")
Expand Down