Skip to content

Commit

Permalink
Revert "(test): Run LogPollerWrapperTest v1/v2 tests sequentially"
Browse files Browse the repository at this point in the history
This reverts commit 1ba2c06.
  • Loading branch information
justinkaseman committed Feb 19, 2024
1 parent 99af29b commit 5388846
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/services/relay/evm/functions/logpoller_wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func getMockedRequestLogV2(t *testing.T) logpoller.Log {
}

func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV1(t *testing.T) {
t.Parallel()
lp, lpWrapper, client := setUp(t, 100_000) // check only once
lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil)

Expand Down Expand Up @@ -156,6 +157,7 @@ func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV1(t *testing.T
}

func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV2(t *testing.T) {
t.Parallel()
lp, lpWrapper, client := setUp(t, 100_000) // check only once
lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil)

Expand Down Expand Up @@ -187,6 +189,7 @@ func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV2(t *testing.T
}

func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) {
t.Parallel()
lp, lpWrapper, client := setUp(t, 100_000) // check only once
lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil)

Expand All @@ -198,6 +201,7 @@ func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) {
}

func TestLogPollerWrapper_LatestEvents_ReorgHandlingV1(t *testing.T) {
t.Parallel()
lp, lpWrapper, client := setUp(t, 100_000)
lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil)
client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById
Expand Down Expand Up @@ -243,6 +247,7 @@ func TestLogPollerWrapper_LatestEvents_ReorgHandlingV1(t *testing.T) {
}

func TestLogPollerWrapper_LatestEvents_ReorgHandlingV2(t *testing.T) {
t.Parallel()
lp, lpWrapper, client := setUp(t, 100_000)
lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil)
client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById
Expand Down Expand Up @@ -288,6 +293,7 @@ func TestLogPollerWrapper_LatestEvents_ReorgHandlingV2(t *testing.T) {
}

func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testing.T) {
t.Parallel()
_, lpWrapper, _ := setUp(t, 100_000)

inputLogs := make([]logpoller.Log, maxLogsToProcess+100)
Expand All @@ -305,6 +311,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testin
}

func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *testing.T) {
t.Parallel()
_, lpWrapper, _ := setUp(t, 100_000)
inputLogs := []logpoller.Log{getMockedRequestLogV1(t)}
inputLogs[0].Topics = [][]byte{[]byte("invalid topic")}
Expand All @@ -319,6 +326,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *test
}

func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_FiltersPreviouslyDetectedEvent(t *testing.T) {
t.Parallel()
_, lpWrapper, _ := setUp(t, 100_000)
mockedRequestLog := getMockedRequestLogV1(t)
inputLogs := []logpoller.Log{mockedRequestLog}
Expand Down

0 comments on commit 5388846

Please sign in to comment.