deflake: TestContainerPids

It is kind of race because `sleep 1s` is short live process.

See: https://github.com/containerd/containerd/issues/7965#issuecomment-1383218025
Fixes: #7965

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu 2023-01-29 12:02:49 +08:00
parent accb53cab4
commit 005d30e849

View File

@ -30,7 +30,7 @@ var (
testImage = images.Get(images.BusyBox) testImage = images.Get(images.BusyBox)
testMultiLayeredImage = images.Get(images.VolumeCopyUp) testMultiLayeredImage = images.Get(images.VolumeCopyUp)
shortCommand = withProcessArgs("true") shortCommand = withProcessArgs("true")
longCommand = withProcessArgs("/bin/sh", "-c", "while true; do sleep 1; done") longCommand = withProcessArgs("/bin/sh", "-c", "while true; do sleep 1d; done")
) )
func TestImagePullSchema1WithEmptyLayers(t *testing.T) { func TestImagePullSchema1WithEmptyLayers(t *testing.T) {