Skip to content

Commit

Permalink
Merge #41032
Browse files Browse the repository at this point in the history
41032: roachtest: attempt to fix cancel test r=jordanlewis a=jordanlewis

There was some suspicious stuff going on in the test, which has been
failing - try to fix it in the hopes that next time it'll be more clear
what's going on.

Attempt to fix #38417

Release note: None
Release justification: test-only change

Co-authored-by: Jordan Lewis <[email protected]>
  • Loading branch information
craig[bot] and jordanlewis committed Sep 24, 2019
2 parents dfd09f3 + 27d2fe4 commit ded2b6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/roachtest/cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func registerCancel(r *testRegistry) {
t.Status("running queries to cancel")
for _, q := range queries {
sem := make(chan struct{}, 1)
go func() {
fmt.Printf("executing \"%s\"\n", q)
go func(q string) {
t.l.Printf("executing \"%s\"\n", q)
sem <- struct{}{}
_, err := conn.Exec(queryPrefix + q)
if err == nil {
Expand All @@ -67,7 +67,7 @@ func registerCancel(r *testRegistry) {
fmt.Printf("query failed with error: %s\n", err)
}
sem <- struct{}{}
}()
}(q)

<-sem

Expand Down

0 comments on commit ded2b6c

Please sign in to comment.