Don't set default parallelism for cloud runs (#36441)

pull/36448/head
Samsondeen 1 year ago committed by GitHub
parent acf478c0b6
commit 86295f518c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -78,7 +78,10 @@ func ParseTest(args []string) (*Test, tfdiags.Diagnostics) {
"The -junit-xml option is currently not compatible with remote test execution via the -cloud-run flag. If you are interested in JUnit XML output for remotely-executed tests please open an issue in GitHub."))
}
if test.OperationParallelism < 1 {
// Only set the default parallelism if this is not a cloud-run test.
// A cloud-run test will eventually run its own local test, and if the
// user still hasn't set the parallelism, that run will use the default.
if test.OperationParallelism < 1 && len(test.CloudRunSource) == 0 {
test.OperationParallelism = DefaultParallelism
}

@ -146,6 +146,18 @@ func TestParseTest(t *testing.T) {
},
wantDiags: nil,
},
"cloud-with-parallelism-0": {
args: []string{"-parallelism=0", "-cloud-run=foobar"},
want: &Test{
CloudRunSource: "foobar",
Filter: nil,
TestDirectory: "tests",
ViewType: ViewHuman,
Vars: &Vars{},
OperationParallelism: 0,
},
wantDiags: nil,
},
"unknown flag": {
args: []string{"-boop"},
want: &Test{

Loading…
Cancel
Save