From 9e16c79951e7769621b7320f1ecdf04baf539b82 Mon Sep 17 00:00:00 2001 From: Mikhail Mazurskiy Date: Mon, 4 Jul 2022 11:23:44 +1000 Subject: [PATCH] fix: don't panic when test cannot start --- cluster_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cluster_test.go b/cluster_test.go index 42f95fbd..ee37dc2d 100644 --- a/cluster_test.go +++ b/cluster_test.go @@ -82,8 +82,10 @@ func (s *clusterScenario) newClusterClient( func (s *clusterScenario) Close() error { for _, port := range s.ports { - processes[port].Close() - delete(processes, port) + if process, ok := processes[port]; ok { + process.Close() + delete(processes, port) + } } return nil }