Skip to content

Commit 472343a

Browse files
committed
fix:sometimes oom test failed
Signed-off-by: ningmingxiao <[email protected]>
1 parent 923e126 commit 472343a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/validate/container_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ var _ = framework.KubeDescribe("Container OOM", func() {
156156
return getContainerStatus(rc, containerID).GetState()
157157
}, time.Minute, time.Second*4).Should(Equal(runtimeapi.ContainerState_CONTAINER_EXITED))
158158

159+
Eventually(func() string {
160+
return getContainerStatus(rc, containerID).GetReason()
161+
}, time.Minute, time.Second*4).Should(Equal("OOMKilled"))
159162
state := getContainerStatus(rc, containerID)
160163

161164
By("exit code is 137")
162165
Expect(state.GetExitCode()).To(BeEquivalentTo(137))
163-
164-
By("reason is OOMKilled")
165-
Expect(state.GetReason()).To(Equal("OOMKilled"))
166166
})
167167
})
168168
})

0 commit comments

Comments
 (0)