Merge pull request #22946 from pwittrock/flaky-node

Auto commit by PR queue bot
pull/6/head
k8s-merge-robot 2016-03-15 12:12:10 -07:00
commit d809db9c22
2 changed files with 10 additions and 7 deletions

View File

@ -140,7 +140,9 @@ func (es *e2eService) startKubeletServer() (*exec.Cmd, error) {
"--api-servers", "http://127.0.0.1:8080", "--api-servers", "http://127.0.0.1:8080",
"--address", "0.0.0.0", "--address", "0.0.0.0",
"--port", "10250", "--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( hcc := newHealthCheckCommand(
"http://127.0.0.1:10255/healthz", "http://127.0.0.1:10255/healthz",
cmd, cmd,

View File

@ -62,7 +62,7 @@ var _ = Describe("Kubelet", func() {
{ {
Image: "gcr.io/google_containers/busybox", Image: "gcr.io/google_containers/busybox",
Name: podName, Name: podName,
Command: []string{"echo", "'Hello World'"}, Command: []string{"sh", "-c", "echo 'Hello World' ; sleep 240"},
}, },
}, },
}, },
@ -82,7 +82,7 @@ var _ = Describe("Kubelet", func() {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
buf.ReadFrom(rc) buf.ReadFrom(rc)
return buf.String() 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() { It("it should be possible to delete", func() {
@ -109,7 +109,7 @@ var _ = Describe("Kubelet", func() {
{ {
Image: "gcr.io/google_containers/busybox", Image: "gcr.io/google_containers/busybox",
Name: podName, Name: podName,
Command: []string{"sh", "-c", "echo test > /file"}, Command: []string{"sh", "-c", "echo test > /file; sleep 240"},
SecurityContext: &api.SecurityContext{ SecurityContext: &api.SecurityContext{
ReadOnlyRootFilesystem: &isReadOnly, ReadOnlyRootFilesystem: &isReadOnly,
}, },
@ -131,7 +131,7 @@ var _ = Describe("Kubelet", func() {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
buf.ReadFrom(rc) buf.ReadFrom(rc)
return buf.String() 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() { It("it should be possible to delete", func() {
@ -154,7 +154,7 @@ var _ = Describe("Kubelet", func() {
createPod(cl, podName, namespace, []api.Container{ createPod(cl, podName, namespace, []api.Container{
{ {
Image: "gcr.io/google_containers/busybox", 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, Name: podName + containerSuffix,
VolumeMounts: []api.VolumeMount{ VolumeMounts: []api.VolumeMount{
{MountPath: "/test-empty-dir-mnt", Name: "test-empty-dir"}, {MountPath: "/test-empty-dir-mnt", Name: "test-empty-dir"},
@ -168,7 +168,8 @@ var _ = Describe("Kubelet", func() {
} }
// Sleep long enough for cadvisor to see the pod and calculate all of its metrics // 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() { Context("when querying /stats/summary", func() {