Skip to content

Commit

Permalink
services: fix TestNotary
Browse files Browse the repository at this point in the history
It is failing sometimes because transaction is being accepted. It
happens because executor's chain continuously produces blocks, so
occasionally the block is being accepted right after transaction
submission.

Close ##3366

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
  • Loading branch information
AliceInHunterland committed Apr 1, 2024
1 parent 86f16bb commit 58e4400
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/services/notary/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,11 @@ func TestNotary(t *testing.T) {
}, completedTx.Scripts[len(completedTx.Scripts)-1])
} else {
completedTx := getCompletedTx(t, false, requests[0].MainTransaction.Hash())
require.Nil(t, completedTx, fmt.Errorf("main transaction shouldn't be completed: sent %d out of %d requests", sentCount, nSigs))
if sentCount != nSigs {
require.Nil(t, completedTx, fmt.Errorf("main transaction shouldn't be completed: sent %d out of %d requests", sentCount, nSigs))
} else {
require.NotNil(t, completedTx, "main transaction should be completed")
}
}
}
checkFallbackTxs := func(t *testing.T, requests []*payload.P2PNotaryRequest, shouldComplete bool) {
Expand Down

0 comments on commit 58e4400

Please sign in to comment.