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

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))