Skip to content

Commit

Permalink
add stop call for utxo chains when test framework is cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
misko9 committed Oct 2, 2024
1 parent 6414014 commit 6681160
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/thorchain/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions examples/utxo/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6681160

Please sign in to comment.