neo icon indicating copy to clipboard operation
neo copied to clipboard

Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context)

Open vncoelho opened this issue 1 year ago • 2 comments

Tries to close https://github.com/neo-project/neo/issues/3231

vncoelho avatar Aug 28 '24 02:08 vncoelho

Get some examples for mock from https://github.com/neo-project/neo-modules/pull/836

vncoelho avatar Aug 28 '24 02:08 vncoelho

image

cschuchardt88 avatar Sep 01 '24 08:09 cschuchardt88

I see it is on Dev branch, maybe it is better to merge as it is and we create other PRs. This PR is already too old

vncoelho avatar May 27 '25 11:05 vncoelho

In fact, SimulateCompleteConsensusRoundAsync was not a test method,

vncoelho avatar May 27 '25 12:05 vncoelho

@Jim8y

I tried to modify some tests to produce errors

image

Like this, the WaitForConsensusMessages should fail because I did not send PrepareRequest.

I think that we still need some minor modifications before merging to "dev". Maybe we could also remove some duplicated tests and code. I am missing coveralls to analyse that more carefully (ping @shargon )

But, overall, the design looks great.

I need to access ConsensusContext of the Actors in order to verify some states after messages are sent and service starts. I am still not sure how to do that.

Sure vitor, give me one day to refactoring this pr to match your review expection.

Jim8y avatar May 29 '25 12:05 Jim8y

Only 25% is covered, but it's a good start

image

shargon avatar Jun 20 '25 09:06 shargon

Test time too long

Neo.Plugins.DBFTPlugin.Tests test succeeded (34.0s)

Wi1l-B0t avatar Jun 21 '25 13:06 Wi1l-B0t