Skip to content

Commit

Permalink
Fix TestIntegration_BlockHistoryEstimator leak (#11741)
Browse files Browse the repository at this point in the history
* Fix TestIntegration_BlockHistoryEstimator leak

* Use servicetest.Run
  • Loading branch information
dimriou authored Jan 11, 2024
1 parent 686553a commit 3332401
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/internal/features/features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
ocrtypes "github.com/smartcontractkit/libocr/offchainreporting/types"

commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config"
"github.com/smartcontractkit/chainlink-common/pkg/services/servicetest"
"github.com/smartcontractkit/chainlink/v2/core/auth"
"github.com/smartcontractkit/chainlink/v2/core/bridges"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets"
Expand Down Expand Up @@ -1319,7 +1320,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {

legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(cc)
for _, re := range cc.Slice() {
require.NoError(t, re.Start(testutils.Context(t)))
servicetest.Run(t, re)
}
var newHeads evmtest.RawSub[*evmtypes.Head]
select {
Expand All @@ -1343,6 +1344,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {
elems := args.Get(1).([]rpc.BatchElem)
elems[0].Result = &b43
})
ethClient.On("Close").Return().Once()

// Simulate one new head and check the gas price got updated
h43 := cltest.Head(43)
Expand Down

0 comments on commit 3332401

Please sign in to comment.