test: actually wait for the TestAgent to be fully shutdown (#6441)

This commit is contained in:
R.B. Boyer 2019-09-05 13:36:26 -05:00 committed by GitHub
parent ac8f3c7431
commit a86e63f81e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -288,7 +288,11 @@ func (a *TestAgent) Shutdown() error {
// shutdown agent before endpoints // shutdown agent before endpoints
defer a.Agent.ShutdownEndpoints() defer a.Agent.ShutdownEndpoints()
return a.Agent.ShutdownAgent() if err := a.Agent.ShutdownAgent(); err != nil {
return err
}
<-a.Agent.ShutdownCh()
return nil
} }
func (a *TestAgent) DNSAddr() string { func (a *TestAgent) DNSAddr() string {