From 13d1be013a1486c40c201e1ea046b6574530cc81 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..56a6f45e9 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 false { + // Skip flaky test below: https://github.com/GoogleCloudPlatform/netd/issues/171 + // Using an `if false` 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")