Skip to content

Commit

Permalink
Merge branch 'develop' into bug/fix-batch-tx-encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-momin authored Dec 15, 2023
2 parents 07994cc + e12a38c commit 0fc4c3d
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions core/chains/evm/txmgr/confirmer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2984,13 +2984,19 @@ func TestEthConfirmer_ResumePendingRuns(t *testing.T) {

pgtest.MustExec(t, db, `UPDATE evm.txes SET pipeline_task_run_id = $1, min_confirmations = $2, signal_callback = TRUE WHERE id = $3`, &tr.ID, minConfirmations, etx.ID)

done := make(chan struct{})
t.Cleanup(func() { <-done })
go func() {
defer close(done)
err2 := ec.ResumePendingTaskRuns(testutils.Context(t), &head)
require.NoError(t, err2)
if !assert.NoError(t, err2) {
return
}
// Retrieve Tx to check if callback completed flag was set to true
updateTx, err3 := txStore.FindTxWithSequence(testutils.Context(t), fromAddress, nonce)
require.NoError(t, err3)
require.Equal(t, true, updateTx.CallbackCompleted)
if assert.NoError(t, err3) {
assert.Equal(t, true, updateTx.CallbackCompleted)
}
}()

select {
Expand Down Expand Up @@ -3032,13 +3038,19 @@ func TestEthConfirmer_ResumePendingRuns(t *testing.T) {

pgtest.MustExec(t, db, `UPDATE evm.txes SET pipeline_task_run_id = $1, min_confirmations = $2, signal_callback = TRUE WHERE id = $3`, &tr.ID, minConfirmations, etx.ID)

done := make(chan struct{})
t.Cleanup(func() { <-done })
go func() {
defer close(done)
err2 := ec.ResumePendingTaskRuns(testutils.Context(t), &head)
require.NoError(t, err2)
if !assert.NoError(t, err2) {
return
}
// Retrieve Tx to check if callback completed flag was set to true
updateTx, err3 := txStore.FindTxWithSequence(testutils.Context(t), fromAddress, nonce)
require.NoError(t, err3)
require.Equal(t, true, updateTx.CallbackCompleted)
if assert.NoError(t, err3) {
assert.Equal(t, true, updateTx.CallbackCompleted)
}
}()

select {
Expand Down

0 comments on commit 0fc4c3d

Please sign in to comment.