From cb05c7d6fcd2dc1bfb036711a2c1389eab72b3d2 Mon Sep 17 00:00:00 2001 From: Jingyuan Liang Date: Mon, 20 Feb 2023 14:32:00 +0000 Subject: [PATCH] Skip flaky test in TestSetupDirectoryWatcher (#171) --- pkg/metrics/collector/pod_ip_metrics_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/metrics/collector/pod_ip_metrics_test.go b/pkg/metrics/collector/pod_ip_metrics_test.go index 2cc2a9696..b2f78a281 100644 --- a/pkg/metrics/collector/pod_ip_metrics_test.go +++ b/pkg/metrics/collector/pod_ip_metrics_test.go @@ -233,6 +233,12 @@ func TestSetupDirectoryWatcher(t *testing.T) { t.Errorf("duplicateIpCount. want: 0, got %d", mc.duplicateIPCount) } + if true { + // Skip flaky test below: https://github.com/GoogleCloudPlatform/netd/issues/171 + // Using an `if true` to avoid unnecessary lint errors (unreachable code). + return + } + // Remove and recreate the file. Verify metrics fakeClock.Sleep(6 * time.Second) mustDeleteFile(t, dir1, "10.0.0.2")