test: cleanup rpc/client and node test fixtures (#7112)

This commit is contained in:
Sam Kleinman
2021-10-12 16:49:45 -04:00
committed by GitHub
parent 0524558696
commit 52ed994416
8 changed files with 845 additions and 949 deletions

View File

@@ -641,12 +641,16 @@ func (n *nodeImpl) OnStop() {
n.Logger.Info("Stopping Node")
// first stop the non-reactor services
if err := n.eventBus.Stop(); err != nil {
n.Logger.Error("Error closing eventBus", "err", err)
if n.eventBus != nil {
// first stop the non-reactor services
if err := n.eventBus.Stop(); err != nil {
n.Logger.Error("Error closing eventBus", "err", err)
}
}
if err := n.indexerService.Stop(); err != nil {
n.Logger.Error("Error closing indexerService", "err", err)
if n.indexerService != nil {
if err := n.indexerService.Stop(); err != nil {
n.Logger.Error("Error closing indexerService", "err", err)
}
}
if n.config.Mode != config.ModeSeed {