From 6681160de3fc8c63a82cb943abab5a539ae82239 Mon Sep 17 00:00:00 2001 From: Steve Miskovetz Date: Wed, 2 Oct 2024 14:39:33 -0600 Subject: [PATCH] add stop call for utxo chains when test framework is cleaning up --- examples/thorchain/setup_test.go | 6 ++++++ examples/utxo/start_test.go | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/examples/thorchain/setup_test.go b/examples/thorchain/setup_test.go index 2353e4963..f39507d7a 100644 --- a/examples/thorchain/setup_test.go +++ b/examples/thorchain/setup_test.go @@ -94,6 +94,12 @@ func StartExoChains(t *testing.T, ctx context.Context, client *client.Client, ne })) t.Cleanup(func() { _ = ic.Close() + for _, chain := range chains { + utxoChain, ok := chain.(*utxo.UtxoChain) + if ok { + utxoChain.Stop() + } + } }) return exoChains diff --git a/examples/utxo/start_test.go b/examples/utxo/start_test.go index 85788199f..537b92d82 100644 --- a/examples/utxo/start_test.go +++ b/examples/utxo/start_test.go @@ -56,6 +56,12 @@ func TestUtxo(t *testing.T) { })) t.Cleanup(func() { _ = ic.Close() + for _, chain := range chains { + utxoChain, ok := chain.(*utxo.UtxoChain) + if ok { + utxoChain.Stop() + } + } }) // Create and fund a user using GetAndFundTestUsers