@@ -1921,10 +1921,11 @@ func TestCreateVM_Isolated(t *testing.T) {
1921
1921
fcClient := fccontrol .NewFirecrackerClient (pluginClient .Client ())
1922
1922
1923
1923
type subtest struct {
1924
- name string
1925
- request proto.CreateVMRequest
1926
- validate func (* testing.T , error )
1927
- stopVM bool
1924
+ name string
1925
+ request proto.CreateVMRequest
1926
+ validate func (* testing.T , error )
1927
+ validateUsesFindProcess bool
1928
+ stopVM bool
1928
1929
}
1929
1930
1930
1931
subtests := []subtest {
@@ -1951,7 +1952,8 @@ func TestCreateVM_Isolated(t *testing.T) {
1951
1952
require .NoError (t , err , "failed waiting for expected firecracker process %q to come up" , firecrackerProcessName )
1952
1953
require .Len (t , firecrackerProcesses , 0 , "expected only no firecracker processes to exist" )
1953
1954
},
1954
- stopVM : false ,
1955
+ validateUsesFindProcess : true ,
1956
+ stopVM : false ,
1955
1957
},
1956
1958
{
1957
1959
name : "Slow Root FS" ,
@@ -1983,6 +1985,12 @@ func TestCreateVM_Isolated(t *testing.T) {
1983
1985
}
1984
1986
1985
1987
runTest := func (t * testing.T , request proto.CreateVMRequest , s subtest ) {
1988
+ // If this test checks the number of the processes on the host
1989
+ // (e.g. the number of Firecracker processes), running the test with
1990
+ // others in parallel messes up the result.
1991
+ if ! s .validateUsesFindProcess {
1992
+ t .Parallel ()
1993
+ }
1986
1994
vmID := testNameToVMID (t .Name ())
1987
1995
1988
1996
tempDir , err := ioutil .TempDir ("" , vmID )
0 commit comments