From 1da6ea640d2c934b9410c3876154ca95dc52f868 Mon Sep 17 00:00:00 2001 From: Jean Arnaud Date: Mon, 15 Jul 2024 11:02:25 +0200 Subject: [PATCH] Cleanup http test servers (#1163) ## Motivation Test flakiness ## Solution Cleanup resources --- .../ocr2/plugins/ccip/testhelpers/integration/chainlink.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go b/core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go index 11d46a17a7..6546d44d10 100644 --- a/core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go +++ b/core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go @@ -561,10 +561,14 @@ func (c *CCIPIntegrationTestHarness) CreatePricesPipeline(t *testing.T) (string, _, err := w.Write([]byte(`{"UsdPerLink": "8000000000000000000"}`)) require.NoError(t, err) })) + t.Cleanup(linkUSD.Close) + ethUSD := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := w.Write([]byte(`{"UsdPerETH": "1700000000000000000000"}`)) require.NoError(t, err) })) + t.Cleanup(ethUSD.Close) + sourceWrappedNative, err := c.Source.Router.GetWrappedNative(nil) require.NoError(t, err) destWrappedNative, err := c.Dest.Router.GetWrappedNative(nil)