diff --git a/core/chains/evm/logpoller/log_poller_test.go b/core/chains/evm/logpoller/log_poller_test.go index 34c819b7ea7..b3d89d7ca61 100644 --- a/core/chains/evm/logpoller/log_poller_test.go +++ b/core/chains/evm/logpoller/log_poller_test.go @@ -1205,12 +1205,11 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { require.Error(t, err) assert.Contains(t, err.Error(), "context canceled") - // test still works when qopts is cancelled - // but context object is not + // test canceled ctx ctx, cancel = context.WithCancel(testutils.Context(t)) cancel() _, err = th.LogPoller.GetBlocksRange(ctx, blockNums) - require.NoError(t, err) + require.Equal(t, err, context.Canceled) } func TestGetReplayFromBlock(t *testing.T) {