aslo close befor shutdown

This commit is contained in:
Umputun
2018-01-09 23:35:04 -06:00
parent d465905e24
commit 759170767c
+2 -1
View File
@@ -95,6 +95,7 @@ func TestServer_Find(t *testing.T) {
srv := prep(t)
assert.NotNil(t, srv)
defer func() {
srv.httpServer.Close()
srv.httpServer.Shutdown(context.Background())
os.Remove(testDb)
}()
@@ -143,7 +144,7 @@ func prep(t *testing.T) *Server {
go func() {
srv.Run()
}()
time.Sleep(200 * time.Millisecond)
time.Sleep(100 * time.Millisecond)
return &srv
}