diff --git a/indexer/abci_test.go b/indexer/abci_test.go index 8e4b584..96d832a 100644 --- a/indexer/abci_test.go +++ b/indexer/abci_test.go @@ -68,7 +68,9 @@ func Test_ListenFinalizeBlock_Subscribe(t *testing.T) { defer app.Close() blockChan, logsChan, pendChan := indexer.Subscribe() - close(pendChan) + defer close(blockChan) + defer close(logsChan) + defer close(pendChan) tx, evmTxHash := tests.GenerateCreateERC20Tx(t, app, privKeys[0]) diff --git a/indexer/mempool_test.go b/indexer/mempool_test.go index 9d0a67a..7fe1bd5 100644 --- a/indexer/mempool_test.go +++ b/indexer/mempool_test.go @@ -17,8 +17,9 @@ func Test_Mempool_Subscribe(t *testing.T) { defer app.Close() blockChan, logsChan, pendChan := indexer.Subscribe() - close(blockChan) - close(logsChan) + defer close(blockChan) + defer close(logsChan) + defer close(pendChan) tx, evmTxHash := tests.GenerateCreateERC20Tx(t, app, privKeys[0])