Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
30f206c9
Commit
30f206c9
authored
Jan 11, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19261 from gmarek/in-test-metrics
Auto commit by PR queue bot
parents
0b750fb0
5cc420c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
33 deletions
+15
-33
density.go
test/e2e/density.go
+1
-19
framework.go
test/e2e/framework.go
+14
-14
No files found.
test/e2e/density.go
View file @
30f206c9
...
@@ -118,24 +118,6 @@ var _ = Describe("Density [Skipped]", func() {
...
@@ -118,24 +118,6 @@ var _ = Describe("Density [Skipped]", func() {
// 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
// replication controller still exists and the replica count
// isn't 0. This means the controller wasn't cleaned up
// during the test so clean it up here. We want to do it separately
// to not cause a timeout on Namespace removal.
rc
,
err
:=
c
.
ReplicationControllers
(
ns
)
.
Get
(
RCName
)
if
err
==
nil
&&
rc
.
Spec
.
Replicas
!=
0
{
By
(
"Cleaning up the replication controller"
)
err
:=
DeleteRC
(
c
,
ns
,
RCName
)
expectNoError
(
err
)
}
By
(
"Removing additional pods if any"
)
for
i
:=
1
;
i
<=
nodeCount
;
i
++
{
name
:=
additionalPodsPrefix
+
"-"
+
strconv
.
Itoa
(
i
)
c
.
Pods
(
ns
)
.
Delete
(
name
,
nil
)
}
// Verify latency metrics.
// Verify latency metrics.
highLatencyRequests
,
err
:=
HighLatencyRequests
(
c
)
highLatencyRequests
,
err
:=
HighLatencyRequests
(
c
)
expectNoError
(
err
)
expectNoError
(
err
)
...
@@ -148,7 +130,7 @@ var _ = Describe("Density [Skipped]", func() {
...
@@ -148,7 +130,7 @@ var _ = Describe("Density [Skipped]", func() {
})
})
// Explicitly put here, to delete namespace at the end of the test
// Explicitly put here, to delete namespace at the end of the test
// (after measuring latency metrics, etc.).
// (after measuring latency metrics, etc.).
framework := NewFramework("density")
framework
:=
NewFramework
(
"density"
)
framework
:=
NewFramework
(
"density"
)
framework
.
NamespaceDeletionTimeout
=
time
.
Hour
framework
.
NamespaceDeletionTimeout
=
time
.
Hour
...
...
test/e2e/framework.go
View file @
30f206c9
...
@@ -136,20 +136,6 @@ func (f *Framework) afterEach() {
...
@@ -136,20 +136,6 @@ func (f *Framework) afterEach() {
Failf
(
"All nodes should be ready after test, %v"
,
err
)
Failf
(
"All nodes should be ready after test, %v"
,
err
)
}
}
if
testContext
.
DeleteNamespace
{
By
(
fmt
.
Sprintf
(
"Destroying namespace %q for this suite."
,
f
.
Namespace
.
Name
))
timeout
:=
5
*
time
.
Minute
if
f
.
NamespaceDeletionTimeout
!=
0
{
timeout
=
f
.
NamespaceDeletionTimeout
}
if
err
:=
deleteNS
(
f
.
Client
,
f
.
Namespace
.
Name
,
timeout
);
err
!=
nil
{
Failf
(
"Couldn't delete ns %q: %s"
,
f
.
Namespace
.
Name
,
err
)
}
}
else
{
Logf
(
"Found DeleteNamespace=false, skipping namespace deletion!"
)
}
summaries
:=
make
([]
TestDataSummary
,
0
)
summaries
:=
make
([]
TestDataSummary
,
0
)
if
testContext
.
GatherKubeSystemResourceUsageData
{
if
testContext
.
GatherKubeSystemResourceUsageData
{
summaries
=
append
(
summaries
,
f
.
gatherer
.
stopAndSummarize
([]
int
{
90
,
99
},
f
.
addonResourceConstraints
))
summaries
=
append
(
summaries
,
f
.
gatherer
.
stopAndSummarize
([]
int
{
90
,
99
},
f
.
addonResourceConstraints
))
...
@@ -176,6 +162,20 @@ func (f *Framework) afterEach() {
...
@@ -176,6 +162,20 @@ func (f *Framework) afterEach() {
}
}
}
}
if
testContext
.
DeleteNamespace
{
By
(
fmt
.
Sprintf
(
"Destroying namespace %q for this suite."
,
f
.
Namespace
.
Name
))
timeout
:=
5
*
time
.
Minute
if
f
.
NamespaceDeletionTimeout
!=
0
{
timeout
=
f
.
NamespaceDeletionTimeout
}
if
err
:=
deleteNS
(
f
.
Client
,
f
.
Namespace
.
Name
,
timeout
);
err
!=
nil
{
Failf
(
"Couldn't delete ns %q: %s"
,
f
.
Namespace
.
Name
,
err
)
}
}
else
{
Logf
(
"Found DeleteNamespace=false, skipping namespace deletion!"
)
}
outputTypes
:=
strings
.
Split
(
testContext
.
OutputPrintType
,
","
)
outputTypes
:=
strings
.
Split
(
testContext
.
OutputPrintType
,
","
)
for
_
,
printType
:=
range
outputTypes
{
for
_
,
printType
:=
range
outputTypes
{
switch
printType
{
switch
printType
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment