Commit fc927e87 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #17770 from gmarek/fix-test

Auto commit by PR queue bot
parents 9ce2ce09 4a785d06
......@@ -432,7 +432,8 @@ case ${JOB_NAME} in
kubernetes-e2e-gce-scalability)
: ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-scalability"}
: ${E2E_NETWORK:="e2e-scalability"}
: ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Performance\]"}
: ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Performance\] \
--gather-resource-usage=true"}
: ${KUBE_GCE_INSTANCE_PREFIX:="e2e-scalability"}
: ${PROJECT:="kubernetes-jenkins"}
# Override GCE defaults.
......
......@@ -82,6 +82,9 @@ var _ = Describe("Density [Skipped]", func() {
var ns string
var uuid string
framework := NewFramework("density")
framework.NamespaceDeletionTimeout = time.Hour
// Gathers data prior to framework namespace teardown
AfterEach(func() {
// Remove any remaining pods from this test if the
......@@ -115,10 +118,6 @@ var _ = Describe("Density [Skipped]", func() {
expectNoError(VerifySchedulerLatency())
})
framework := NewFramework("density")
framework.NamespaceDeletionTimeout = time.Hour
framework.GatherKubeSystemResourceUsageData = testContext.GatherKubeSystemResourceUsageData
BeforeEach(func() {
c = framework.Client
ns = framework.Namespace.Name
......
......@@ -88,7 +88,7 @@ func init() {
flag.BoolVar(&testContext.VerifyServiceAccount, "e2e-verify-service-account", true, "If true tests will verify the service account before running.")
flag.BoolVar(&testContext.DeleteNamespace, "delete-namespace", true, "If true tests will delete namespace after completion. It is only designed to make debugging easier, DO NOT turn it off by default.")
flag.BoolVar(&testContext.CleanStart, "clean-start", false, "If true, purge all namespaces except default and system before running tests. This serves to cleanup test namespaces from failed/interrupted e2e runs in a long-lived cluster.")
flag.BoolVar(&testContext.GatherKubeSystemResourceUsageData, "gather-resource-usage", true, "If set to true framework will be monitoring resource usage of system add-ons in (some) e2e tests.")
flag.BoolVar(&testContext.GatherKubeSystemResourceUsageData, "gather-resource-usage", false, "If set to true framework will be monitoring resource usage of system add-ons in (some) e2e tests.")
}
func TestE2E(t *testing.T) {
......
......@@ -41,9 +41,6 @@ type Framework struct {
Client *client.Client
NamespaceDeletionTimeout time.Duration
// If set to true framework will start a goroutine monitoring resource usage of system add-ons.
// It will read the data every 30 seconds from all Nodes and print summary during afterEach.
GatherKubeSystemResourceUsageData bool
gatherer containerResourceGatherer
}
......@@ -82,7 +79,7 @@ func (f *Framework) beforeEach() {
Logf("Skipping waiting for service account")
}
if f.GatherKubeSystemResourceUsageData {
if testContext.GatherKubeSystemResourceUsageData {
f.gatherer.startGatheringData(c, time.Minute)
}
}
......@@ -126,7 +123,7 @@ func (f *Framework) afterEach() {
Logf("Found DeleteNamespace=false, skipping namespace deletion!")
}
if f.GatherKubeSystemResourceUsageData {
if testContext.GatherKubeSystemResourceUsageData {
f.gatherer.stopAndPrintData([]int{50, 90, 99, 100})
}
// Paranoia-- prevent reuse!
......
......@@ -136,6 +136,8 @@ type TestContextType struct {
VerifyServiceAccount bool
DeleteNamespace bool
CleanStart bool
// If set to true framework will start a goroutine monitoring resource usage of system add-ons.
// It will read the data every 30 seconds from all Nodes and print summary during afterEach.
GatherKubeSystemResourceUsageData bool
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment