Wait until all goroutines finish before shutdown

4 jobs for master
Status Job ID Name Coverage
  Test
canceled #6666
android

canceled #6669
debian-testing

canceled #6667
go-1.13

canceled #6668
go-1.14