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
This commit is contained in:
Etienne Perot
2023-01-24 14:24:50 -08:00
committed by gVisor bot
parent 22961a9e41
commit cb5ecf817b
+2 -2
View File
@@ -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)