mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 15:32:30 +00:00
Merge pull request #2921 from Amulyam24/template_test
virtcontainers: fix failing template test on ppc64le
This commit is contained in:
commit
f80ca66300
@ -129,7 +129,16 @@ func TestTemplateFactory(t *testing.T) {
|
|||||||
// CloseFactory, there is no need to call tt.CloseFactory(ctx)
|
// CloseFactory, there is no need to call tt.CloseFactory(ctx)
|
||||||
f.CloseFactory(ctx)
|
f.CloseFactory(ctx)
|
||||||
|
|
||||||
// expect tt.statePath not exist, if exist, it means this case failed.
|
//umount may take more time. Check periodically if the mount exists
|
||||||
_, err = os.Stat(tt.statePath)
|
waitTime, delay := 20, 1*time.Second
|
||||||
assert.Nil(err)
|
for check := waitTime; check > 0; {
|
||||||
|
// expect tt.statePath not exist, if exist, it means this case failed.
|
||||||
|
_, err = os.Stat(tt.statePath)
|
||||||
|
if err != nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
check -= 1
|
||||||
|
time.Sleep(delay)
|
||||||
|
}
|
||||||
|
assert.True(os.IsNotExist(err), fmt.Sprintf("mount still present after waiting %d seconds", waitTime))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user