microsoft / vscode-go

An extension for VS Code which provides support for the Go language. We have moved to https://github.com/golang/vscode-go
Other
5.93k stars 645 forks source link

test/integration: fix Build Tags checking tests #3232

Closed hyangah closed 4 years ago

hyangah commented 4 years ago

The test invoked 'check' concurrently with different sets of tags. Underneath, the check function invokes the goBuild, which cancels outstanding go build commands before starting another go build command. That means, the three go build processes race and try to cancel others. The premature cancelation results in empty diagnostics and thus, flakiness when tests expect non-empty results.

Serialize the tests.

While we are here, also fixes the use of assert.equal which expects the actual value as the first parameter and the expected value as the second parameter.

hyangah commented 4 years ago

Merged to golang/vscode-go with https://go-review.googlesource.com/c/vscode-go/+/233517