From 82d6c2f9317e5f2953f83494a2a84e7b8c69c4c3 Mon Sep 17 00:00:00 2001 From: Tony Fang Date: Mon, 9 Jan 2023 05:22:12 +0000 Subject: [PATCH] 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 --- integration/container_stats_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/integration/container_stats_test.go b/integration/container_stats_test.go index 0d4d458bd..d8b242997 100644 --- a/integration/container_stats_test.go +++ b/integration/container_stats_test.go @@ -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))