Fix race in integration testlogger (#6556)

* Fix race in logger

* At testing end drop the reference to the last test.
This commit is contained in:
zeripath 2019-04-11 12:49:49 +01:00 committed by Lunny Xiao
parent 346036d47f
commit c02c6a144f
2 changed files with 23 additions and 0 deletions

View file

@ -81,6 +81,8 @@ func TestMain(m *testing.M) {
}
exitCode := m.Run()
writerCloser.t = nil
if err = os.RemoveAll(setting.Indexer.IssuePath); err != nil {
fmt.Printf("os.RemoveAll: %v\n", err)
os.Exit(1)