Skip to content

Commit

Permalink
cmd: increase timeout and make TESTS regex more specific in pull-requ…
Browse files Browse the repository at this point in the history
…est-make

This commit increases the timeout from 5 to 10 minutes (I ran into
a situation where the CI `testrace` was timing out). Also, it adds `$$`
symbols to the end of each test so that full length matching occurred
instead of prefix matching (e.g. `TestSort` also matches
`TestSortedDistinct` which could be not modified in the PR to run
`testrace` for).

Release note: None
  • Loading branch information
yuzefovich committed Jan 20, 2020
1 parent f28ef67 commit c90fcb1
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 @@ -256,8 +256,8 @@ func main() {
log.Fatal(err)
}
if len(pkgs) > 0 {
// 5 minutes total seems OK, but at least a minute per test.
duration := (5 * time.Minute) / time.Duration(len(pkgs))
// 10 minutes total seems OK, but at least a minute per test.
duration := (10 * time.Minute) / time.Duration(len(pkgs))
if duration < time.Minute {
duration = time.Minute
}
Expand All @@ -267,7 +267,7 @@ func main() {
for name, pkg := range pkgs {
tests := "-"
if len(pkg.tests) > 0 {
tests = "(" + strings.Join(pkg.tests, "|") + ")"
tests = "(" + strings.Join(pkg.tests, "$$|") + "$$)"
}

cmd := exec.Command(
Expand Down

0 comments on commit c90fcb1

Please sign in to comment.