hashicorp / go-plugin

Golang plugin system over RPC.
Mozilla Public License 2.0
5.25k stars 450 forks source link

Add test for stdout scanner race with runner.Wait() #300

Closed tomhjp closed 8 months ago

tomhjp commented 8 months ago

Adds a test-case for #299 that reliably fails before the patch, and reliably passes after it.

I ran go test -count=100 -run ^TestClient_noStdoutScannerRace$ github.com/hashicorp/go-plugin on commits 586d14f3dcef1eb42bfb7da4c7af102ec6638668 (but with this test added) and 9b348465c6b69c0e402a226c795b1b23a76798af, and got 100/100 failures and 0/100 failures respectively.

tomhjp commented 8 months ago

Thanks!