Merge pull request #82291 from danwinship/getnodes

migrate from framework.GetReadySchedulableNodesOrDie to e2enode.GetReadySchedulableNodes
This commit is contained in:
Kubernetes Prow Robot
2019-09-25 11:04:43 -07:00
committed by GitHub
58 changed files with 308 additions and 239 deletions

View File

@@ -18,6 +18,7 @@ go_library(
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//test/e2e/framework:go_default_library",
"//test/e2e/framework/node:go_default_library",
"//test/e2e/instrumentation/common:go_default_library",
"//test/e2e/instrumentation/logging/utils:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",

View File

@@ -22,6 +22,7 @@ import (
"time"
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
instrumentation "k8s.io/kubernetes/test/e2e/instrumentation/common"
"k8s.io/kubernetes/test/e2e/instrumentation/logging/utils"
@@ -42,7 +43,8 @@ var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackd
ginkgo.It("should ingest logs from applications running for a prolonged amount of time", func() {
withLogProviderForScope(f, podsScope, func(p *sdLogProvider) {
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet).Items
nodes, err := e2enode.GetReadySchedulableNodes(f.ClientSet)
framework.ExpectNoError(err)
maxPodCount := 10
jobDuration := 30 * time.Minute
linesPerPodPerSecond := 100
@@ -65,7 +67,7 @@ var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackd
podsByRun := [][]utils.FiniteLoggingPod{}
for runIdx := 0; runIdx < podRunCount; runIdx++ {
podsInRun := []utils.FiniteLoggingPod{}
for nodeIdx, node := range nodes {
for nodeIdx, node := range nodes.Items {
podName := fmt.Sprintf("job-logs-generator-%d-%d-%d-%d", maxPodCount, linesPerPod, runIdx, nodeIdx)
pod := utils.NewLoadLoggingPod(podName, node.Name, linesPerPod, jobDuration)
pods = append(pods, pod)
@@ -90,7 +92,7 @@ var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackd
}()
checker := utils.NewFullIngestionPodLogChecker(p, maxAllowedLostFraction, pods...)
err := utils.WaitForLogs(checker, ingestionInterval, ingestionTimeout)
err = utils.WaitForLogs(checker, ingestionInterval, ingestionTimeout)
framework.ExpectNoError(err)
utils.EnsureLoggingAgentRestartsCount(f, p.LoggingAgentName(), allowedRestarts)