Skip to content

Commit d5e3ac5

Browse files
committed
Adjust TestMultipleVMs_Isolated's timeout
Seems 20 seconds is too tight. This may not indicate a latency regression. More developers we have, more tests we would run in parallel during work hours. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent fffb1cd commit d5e3ac5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

runtime/service_integ_test.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func TestMultipleVMs_Isolated(t *testing.T) {
287287
},
288288
}
289289

290-
testTimeout := 600 * time.Second
290+
testTimeout := 10 * time.Minute
291291
ctx, cancel := context.WithTimeout(namespaces.WithNamespace(context.Background(), defaultNamespace), testTimeout)
292292
defer cancel()
293293

@@ -327,11 +327,6 @@ func TestMultipleVMs_Isolated(t *testing.T) {
327327
fcClient := fccontrol.NewFirecrackerClient(pluginClient.Client())
328328
req := &proto.CreateVMRequest{
329329
VMID: vmIDStr,
330-
// Enabling Go Race Detector makes in-microVM binaries heavy in terms of CPU and memory.
331-
MachineCfg: &proto.FirecrackerMachineConfiguration{
332-
VcpuCount: 4,
333-
MemSizeMib: 4096,
334-
},
335330
RootDrive: &proto.FirecrackerRootDrive{
336331
HostPath: rootfsPath,
337332
},
@@ -346,6 +341,13 @@ func TestMultipleVMs_Isolated(t *testing.T) {
346341
},
347342
ContainerCount: containerCount,
348343
JailerConfig: jailerConfig,
344+
// In tests, our in-VM agent has Go's race detector,
345+
// which makes the agent resource-hoggy than its production build
346+
// So the default VM size (128MB) is too small.
347+
MachineCfg: &proto.FirecrackerMachineConfiguration{MemSizeMib: 1024},
348+
// Because this test starts multiple VMs in parallel, some of them may not start within
349+
// the default timeout (20 seconds).
350+
TimeoutSeconds: 60,
349351
}
350352

351353
resp, err := fcClient.CreateVM(ctx, req)

0 commit comments

Comments
 (0)