From cb5ecf817bb8b45c3988f820fc33d4065772f763 Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Tue, 24 Jan 2023 14:22:06 -0800 Subject: [PATCH] `metric_server_test`: Extend timeout. While I was not able to reproduce any flakiness in this test (even with `--runs_per_test=8192`), logs of the last failure show that the machine was simply super slow to perform any operation (starting containers, stopping them, `exec`ing into them), and that it just happened to hit the 50-second mark around the time where the metric server was meant to be restarted. PiperOrigin-RevId: 504374949 --- runsc/container/metric_server_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runsc/container/metric_server_test.go b/runsc/container/metric_server_test.go index 649bdc34f..a4a3424af 100644 --- a/runsc/container/metric_server_test.go +++ b/runsc/container/metric_server_test.go @@ -57,9 +57,9 @@ func setupMetrics(t *testing.T) (*metricsTest, func()) { childReaper.Start() cu := cleanup.Make(childReaper.Stop) - cleanupCtx, cleanupCancel := context.WithTimeout(context.Background(), 1*time.Minute) + cleanupCtx, cleanupCancel := context.WithTimeout(context.Background(), 3*time.Minute+30*time.Second) cu.Add(cleanupCancel) - testCtx, testCancel := context.WithTimeout(cleanupCtx, 50*time.Second) + testCtx, testCancel := context.WithTimeout(cleanupCtx, 3*time.Minute) cu.Add(testCancel) spec, conf := sleepSpecConf(t)