Skip to content

Commit

Permalink
Cleanup http test servers (#1163)
Browse files Browse the repository at this point in the history
## Motivation

Test flakiness

## Solution

Cleanup resources
  • Loading branch information
jarnaud authored Jul 15, 2024
1 parent 50fae99 commit 1da6ea6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1da6ea6

Please sign in to comment.