From c1dd527dd10137e5454c83ed3767698e152783c2 Mon Sep 17 00:00:00 2001 From: Dawn Chen Date: Mon, 15 Jun 2015 14:38:45 -0700 Subject: [PATCH] Fix the unittests cause by applying oom_score_adj (0) to the user containers. --- pkg/kubelet/dockertools/manager_test.go | 18 +++++++++--------- pkg/kubelet/kubelet_test.go | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/kubelet/dockertools/manager_test.go b/pkg/kubelet/dockertools/manager_test.go index 1241feb8e7a..fe69ffb74c3 100644 --- a/pkg/kubelet/dockertools/manager_test.go +++ b/pkg/kubelet/dockertools/manager_test.go @@ -896,7 +896,7 @@ func TestSyncPodCreateNetAndContainer(t *testing.T) { // Create pod infra container. "create", "start", "inspect_container", // Create container. - "create", "start", + "create", "start", "inspect_container", }) fakeDocker.Lock() @@ -945,7 +945,7 @@ func TestSyncPodCreatesNetAndContainerPullsImage(t *testing.T) { // Create pod infra container. "create", "start", "inspect_container", // Create container. - "create", "start", + "create", "start", "inspect_container", }) fakeDocker.Lock() @@ -997,7 +997,7 @@ func TestSyncPodWithPodInfraCreatesContainer(t *testing.T) { // Inspect pod infra container (but does not create)" "inspect_container", // Create container. - "create", "start", + "create", "start", "inspect_container", }) fakeDocker.Lock() @@ -1038,7 +1038,7 @@ func TestSyncPodDeletesWithNoPodInfraContainer(t *testing.T) { // Create pod infra container. "create", "start", "inspect_container", // Create container. - "create", "start", + "create", "start", "inspect_container", }) // A map iteration is used to delete containers, so must not depend on @@ -1163,7 +1163,7 @@ func TestSyncPodBadHash(t *testing.T) { // Check the pod infra container. "inspect_container", // Kill and restart the bad hash container. - "inspect_container", "stop", "create", "start", + "inspect_container", "stop", "create", "start", "inspect_container", }) if err := fakeDocker.AssertStopped([]string{"1234"}); err != nil { @@ -1223,7 +1223,7 @@ func TestSyncPodsUnhealthy(t *testing.T) { // Kill the unhealthy container. "inspect_container", "stop", // Restart the unhealthy container. - "create", "start", + "create", "start", "inspect_container", }) if err := fakeDocker.AssertStopped([]string{"1234"}); err != nil { @@ -1408,7 +1408,7 @@ func TestSyncPodWithRestartPolicy(t *testing.T) { // Check the pod infra container. "inspect_container", // Restart both containers. - "create", "start", "create", "start", + "create", "start", "inspect_container", "create", "start", "inspect_container", }, []string{"succeeded", "failed"}, []string{}, @@ -1419,7 +1419,7 @@ func TestSyncPodWithRestartPolicy(t *testing.T) { // Check the pod infra container. "inspect_container", // Restart the failed container. - "create", "start", + "create", "start", "inspect_container", }, []string{"failed"}, []string{}, @@ -1832,7 +1832,7 @@ func TestSyncPodWithPodInfraCreatesContainerCallsHandler(t *testing.T) { // Check the pod infra container. "inspect_container", // Create container. - "create", "start", + "create", "start", "inspect_container", }) fakeDocker.Lock() diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index e4b52692599..7428628cc46 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -485,7 +485,7 @@ func TestSyncPodsWithTerminationLog(t *testing.T) { // Create pod infra container. "create", "start", "inspect_container", // Create container. - "create", "start", + "create", "start", "inspect_container", // Get pod status. "list", "inspect_container", "inspect_container", // Get pods for deleting orphaned volumes.