Merge pull request #7935 from fangn2/fix-TestContainerConsumedStats

Fix Flaky Windows CRI Integration test on TestContainerConsumedStats
This commit is contained in:
Fu Wei 2023-01-09 21:18:59 +08:00 committed by GitHub
commit da163ef3b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,9 +103,15 @@ func TestContainerConsumedStats(t *testing.T) {
if err != nil {
return false, err
}
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))