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
46b62c20
Commit
46b62c20
authored
May 16, 2018
by
Michelle Au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait for pod deletion instead of termination
parent
7e75a09d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
util.go
test/e2e/framework/util.go
+3
-0
BUILD
test/e2e/storage/utils/BUILD
+0
-1
utils.go
test/e2e/storage/utils/utils.go
+3
-7
No files found.
test/e2e/framework/util.go
View file @
46b62c20
...
@@ -116,6 +116,9 @@ const (
...
@@ -116,6 +116,9 @@ const (
// minutes by slow docker pulls or something else.
// minutes by slow docker pulls or something else.
PodStartShortTimeout
=
1
*
time
.
Minute
PodStartShortTimeout
=
1
*
time
.
Minute
// How long to wait for a pod to be deleted
PodDeleteTimeout
=
5
*
time
.
Minute
// If there are any orphaned namespaces to clean up, this test is running
// If there are any orphaned namespaces to clean up, this test is running
// on a long lived cluster. A long wait here is preferably to spurious test
// on a long lived cluster. A long wait here is preferably to spurious test
// failures caused by leaked resources from a previous test run.
// failures caused by leaked resources from a previous test run.
...
...
test/e2e/storage/utils/BUILD
View file @
46b62c20
...
@@ -17,7 +17,6 @@ go_library(
...
@@ -17,7 +17,6 @@ go_library(
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
],
],
...
...
test/e2e/storage/utils/utils.go
View file @
46b62c20
...
@@ -24,7 +24,6 @@ import (
...
@@ -24,7 +24,6 @@ import (
.
"github.com/onsi/ginkgo"
.
"github.com/onsi/ginkgo"
.
"github.com/onsi/gomega"
.
"github.com/onsi/gomega"
"k8s.io/api/core/v1"
"k8s.io/api/core/v1"
apierrs
"k8s.io/apimachinery/pkg/api/errors"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
clientset
"k8s.io/client-go/kubernetes"
clientset
"k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework"
...
@@ -191,14 +190,11 @@ func TestVolumeUnmountsFromDeletedPodWithForceOption(c clientset.Interface, f *f
...
@@ -191,14 +190,11 @@ func TestVolumeUnmountsFromDeletedPodWithForceOption(c clientset.Interface, f *f
}
}
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
// Wait for pod to enter "Terminating state"
time
.
Sleep
(
30
*
time
.
Second
)
By
(
"Starting the kubelet and waiting for pod to delete."
)
By
(
"Starting the kubelet and waiting for pod to delete."
)
KubeletCommand
(
KStart
,
c
,
clientPod
)
KubeletCommand
(
KStart
,
c
,
clientPod
)
err
=
f
.
WaitForPod
Terminated
(
clientPod
.
Name
,
""
)
err
=
f
.
WaitForPod
NotFound
(
clientPod
.
Name
,
framework
.
PodDeleteTimeout
)
if
!
apierrs
.
IsNotFound
(
err
)
&&
err
!=
nil
{
if
err
!=
nil
{
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Expected pod to
terminate
."
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Expected pod to
be not found
."
)
}
}
if
forceDelete
{
if
forceDelete
{
...
...
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