mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
Merge pull request #17770 from gmarek/fix-test
Auto commit by PR queue bot
This commit is contained in:
commit
fc927e8719
@ -432,7 +432,8 @@ case ${JOB_NAME} in
|
|||||||
kubernetes-e2e-gce-scalability)
|
kubernetes-e2e-gce-scalability)
|
||||||
: ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-scalability"}
|
: ${E2E_CLUSTER_NAME:="jenkins-gce-e2e-scalability"}
|
||||||
: ${E2E_NETWORK:="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"}
|
: ${KUBE_GCE_INSTANCE_PREFIX:="e2e-scalability"}
|
||||||
: ${PROJECT:="kubernetes-jenkins"}
|
: ${PROJECT:="kubernetes-jenkins"}
|
||||||
# Override GCE defaults.
|
# Override GCE defaults.
|
||||||
|
@ -82,6 +82,9 @@ var _ = Describe("Density [Skipped]", func() {
|
|||||||
var ns string
|
var ns string
|
||||||
var uuid string
|
var uuid string
|
||||||
|
|
||||||
|
framework := NewFramework("density")
|
||||||
|
framework.NamespaceDeletionTimeout = time.Hour
|
||||||
|
|
||||||
// Gathers data prior to framework namespace teardown
|
// Gathers data prior to framework namespace teardown
|
||||||
AfterEach(func() {
|
AfterEach(func() {
|
||||||
// Remove any remaining pods from this test if the
|
// Remove any remaining pods from this test if the
|
||||||
@ -115,10 +118,6 @@ var _ = Describe("Density [Skipped]", func() {
|
|||||||
expectNoError(VerifySchedulerLatency())
|
expectNoError(VerifySchedulerLatency())
|
||||||
})
|
})
|
||||||
|
|
||||||
framework := NewFramework("density")
|
|
||||||
framework.NamespaceDeletionTimeout = time.Hour
|
|
||||||
framework.GatherKubeSystemResourceUsageData = testContext.GatherKubeSystemResourceUsageData
|
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
c = framework.Client
|
c = framework.Client
|
||||||
ns = framework.Namespace.Name
|
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.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.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.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) {
|
func TestE2E(t *testing.T) {
|
||||||
|
@ -41,9 +41,6 @@ type Framework struct {
|
|||||||
Client *client.Client
|
Client *client.Client
|
||||||
NamespaceDeletionTimeout time.Duration
|
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
|
gatherer containerResourceGatherer
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +79,7 @@ func (f *Framework) beforeEach() {
|
|||||||
Logf("Skipping waiting for service account")
|
Logf("Skipping waiting for service account")
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.GatherKubeSystemResourceUsageData {
|
if testContext.GatherKubeSystemResourceUsageData {
|
||||||
f.gatherer.startGatheringData(c, time.Minute)
|
f.gatherer.startGatheringData(c, time.Minute)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,7 +123,7 @@ func (f *Framework) afterEach() {
|
|||||||
Logf("Found DeleteNamespace=false, skipping namespace deletion!")
|
Logf("Found DeleteNamespace=false, skipping namespace deletion!")
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.GatherKubeSystemResourceUsageData {
|
if testContext.GatherKubeSystemResourceUsageData {
|
||||||
f.gatherer.stopAndPrintData([]int{50, 90, 99, 100})
|
f.gatherer.stopAndPrintData([]int{50, 90, 99, 100})
|
||||||
}
|
}
|
||||||
// Paranoia-- prevent reuse!
|
// Paranoia-- prevent reuse!
|
||||||
|
@ -136,6 +136,8 @@ type TestContextType struct {
|
|||||||
VerifyServiceAccount bool
|
VerifyServiceAccount bool
|
||||||
DeleteNamespace bool
|
DeleteNamespace bool
|
||||||
CleanStart 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
|
GatherKubeSystemResourceUsageData bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user