Revert container_stats_test.go change which caused Windows CRI integration test failure

PR #7892 which supposed to fix issue on Linux introduced random failure
on Windows, this commit is to revert that change for Windows platform

Signed-off-by: Tony Fang <nenghui.fang@gmail.com>
This commit is contained in:
Tony Fang 2023-01-09 05:22:12 +00:00
parent 5e7baa2eb3
commit 82d6c2f931

View File

@ -103,8 +103,14 @@ func TestContainerConsumedStats(t *testing.T) {
if err != nil {
return false, err
}
if s.GetWritableLayer().GetTimestamp() > 0 {
return true, nil
if goruntime.GOOS == "windows" {
if s.GetMemory().GetWorkingSetBytes().GetValue() > 0 {
return true, nil
}
} else {
if s.GetWritableLayer().GetTimestamp() > 0 {
return true, nil
}
}
return false, nil
}, time.Second, 30*time.Second))