Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node e2e - make more resilient to flakes #22946

Merged
merged 1 commit into from
Mar 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/e2e_node/e2e_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ func (es *e2eService) startKubeletServer() (*exec.Cmd, error) {
"--api-servers", "http://127.0.0.1:8080",
"--address", "0.0.0.0",
"--port", "10250",
"--hostname-override", es.nodeName) // Required because hostname is inconsistent across hosts
"--hostname-override", es.nodeName, // Required because hostname is inconsistent across hosts
"--volume-stats-agg-period", "10s", // Aggregate volumes frequently so tests don't need to wait as long
)
hcc := newHealthCheckCommand(
"http://127.0.0.1:10255/healthz",
cmd,
Expand Down
13 changes: 7 additions & 6 deletions test/e2e_node/kubelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var _ = Describe("Kubelet", func() {
{
Image: "gcr.io/google_containers/busybox",
Name: podName,
Command: []string{"echo", "'Hello World'"},
Command: []string{"sh", "-c", "echo 'Hello World' ; sleep 240"},
},
},
},
Expand All @@ -82,7 +82,7 @@ var _ = Describe("Kubelet", func() {
buf := new(bytes.Buffer)
buf.ReadFrom(rc)
return buf.String()
}, time.Second*30, time.Second*4).Should(Equal("'Hello World'\n"))
}, time.Minute, time.Second*4).Should(Equal("Hello World\n"))
})

It("it should be possible to delete", func() {
Expand All @@ -109,7 +109,7 @@ var _ = Describe("Kubelet", func() {
{
Image: "gcr.io/google_containers/busybox",
Name: podName,
Command: []string{"sh", "-c", "echo test > /file"},
Command: []string{"sh", "-c", "echo test > /file; sleep 240"},
SecurityContext: &api.SecurityContext{
ReadOnlyRootFilesystem: &isReadOnly,
},
Expand All @@ -131,7 +131,7 @@ var _ = Describe("Kubelet", func() {
buf := new(bytes.Buffer)
buf.ReadFrom(rc)
return buf.String()
}, time.Second*30, time.Second*4).Should(Equal("sh: can't create /file: Read-only file system\n"))
}, time.Minute, time.Second*4).Should(Equal("sh: can't create /file: Read-only file system\n"))
})

It("it should be possible to delete", func() {
Expand All @@ -154,7 +154,7 @@ var _ = Describe("Kubelet", func() {
createPod(cl, podName, namespace, []api.Container{
{
Image: "gcr.io/google_containers/busybox",
Command: []string{"sh", "-c", "echo 'Hello World' | tee ~/file | tee /test-empty-dir-mnt | sleep 60"},
Command: []string{"sh", "-c", "while true; do echo 'hello world' | tee ~/file | tee /test-empty-dir-mnt ; sleep 1; done"},
Name: podName + containerSuffix,
VolumeMounts: []api.VolumeMount{
{MountPath: "/test-empty-dir-mnt", Name: "test-empty-dir"},
Expand All @@ -168,7 +168,8 @@ var _ = Describe("Kubelet", func() {
}

// Sleep long enough for cadvisor to see the pod and calculate all of its metrics
time.Sleep(60 * time.Second)
// TODO: Get this to work with polling / eventually
time.Sleep(time.Minute * 2)
})

Context("when querying /stats/summary", func() {
Expand Down