diff --git a/nodebuilder/tests/fraud_test.go b/nodebuilder/tests/fraud_test.go index 616f198df1..61eca88e21 100644 --- a/nodebuilder/tests/fraud_test.go +++ b/nodebuilder/tests/fraud_test.go @@ -119,25 +119,22 @@ func TestFraudProofHandling(t *testing.T) { // FIXME: Eventually, this should be a check on service registry managing and keeping // lifecycles of each Module. // 6. - attempts := 0 // random height after befp.height height := uint64(15) // initial timeout is set to 5 sec, as we are targeting the height=15, - // blockTime=1 sec, expected befp height=10 + // blockTime=1 sec, expected befp.height=10 timeOut := blockTime * 5 - // during befp validation the node can still receive headers and it mostly depends on // the operating system or hardware(e.g. on macOS tests is working 100% time with a single height=15, // and on the Linux VM sometimes the last height is 17-18). So, lets give a chance for our befp validator to check // the fraud proof and stop the syncer. - for attempts < 5 { + for height < 20 { syncCtx, syncCancel := context.WithTimeout(context.Background(), timeOut) _, err = full.HeaderServ.WaitForHeight(syncCtx, height) syncCancel() if err != nil { break } - attempts++ timeOut = blockTime height++ } @@ -167,7 +164,6 @@ func TestFraudProofHandling(t *testing.T) { // 9. fN := sw.NewNodeWithStore(node.Full, store) err = fN.Start(ctx) - require.Error(t, err) var fpExist *fraud.ErrFraudExists[*header.ExtendedHeader] require.ErrorAs(t, err, &fpExist)