Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
testing: testlog kills tests that call m.Run multiple times #23129
After fixing #23047, running the influxdb tests turned up a failure caused by github.com/influxdata/influxdb/tests/server_test.go, which (surprise!) runs m.Run in a loop during TestMain:
This only barely works today. Flags like -test.cpuprofile overwrite the output on each iteration, so that the profile applies only to the last iteration. But it doesn't crash in Go 1.9. Now it crashes, because the second m.Run calls testlog.SetLogger, and testlog.SetLogger must only be called once.
I guess now we have to support running m.Run multiple times. Sigh.