Skip to content

Commit

Permalink
github-pull-request-make: use longer test timeout, test fewer tests
Browse files Browse the repository at this point in the history
Try choosing only 4 tests to test instead of 5. Also increase the
individual per-test timeout from 75% of duration to 90%.

Epic: none
Release note: None
  • Loading branch information
rickystewart committed Nov 15, 2023
1 parent 2ebdcfb commit faff914
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/github-pull-request-make/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ func chooseFiveTestsPerPackage(pkgs map[string]pkg) map[string]pkg {
croppedPkgs := make(map[string]pkg)
for pkgName, tests := range pkgs {
randomOrderTests := scrambleTestOrder(tests)
cropIdx := 5
if len(randomOrderTests) < 5 {
cropIdx := 4
if len(randomOrderTests) < cropIdx {
cropIdx = len(randomOrderTests)
}
croppedPkgs[pkgName] = makePkg(randomOrderTests[:cropIdx])
Expand Down Expand Up @@ -289,7 +289,7 @@ func main() {
}
// Use a timeout shorter than the duration so that hanging tests don't
// get a free pass.
timeout := (3 * duration) / 4
timeout := (9 * duration) / 10

// The stress -p flag defaults to the number of CPUs, which is too
// aggressive on big machines and can cause tests to fail. Under nightly
Expand Down

0 comments on commit faff914

Please sign in to comment.