Skip to content

Commit

Permalink
add npe protection when stopping cl cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed May 17, 2024
1 parent e422bbc commit 2f3ee7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration-tests/docker/test_env/cl_node_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func (c *ClCluster) Stop() error {
for i := 0; i < len(nodes); i++ {
nodeIndex := i
eg.Go(func() error {
if nodes[nodeIndex].Container == nil {
return fmt.Errorf("attempt to stop node %d failed, because Container was nil, this should not have happened", nodeIndex)
}
err := nodes[nodeIndex].Container.Stop(context.Background(), &timeout)
if err != nil {
return err
Expand Down

0 comments on commit 2f3ee7b

Please sign in to comment.