-
Notifications
You must be signed in to change notification settings - Fork 130
Refactoring for more readable IBFT IT #614
Refactoring for more readable IBFT IT #614
Conversation
The changes in the test are nice ... but not confident a thing called "Roles" should be generating msgs for the group ... Maybe a rename needed? Or maybe a wrapping class? GENERALLY - it'd be really nice if we could seed both the "assertMessagesSentToPeers" and a "Message Sender" with the peers, so we don't need to call them out explicitly ... |
Ah yes, the fun of good naming!
Probably a rename, as thnking about it, RoundSpecificNodeRoles is currently just the network of
This is a great idea, keeping both those functions in the same is grouping that aspect of responsibility together. |
...tegration-test/java/tech/pegasys/pantheon/consensus/ibft/support/RoundSpecificNodeRoles.java
Show resolved
Hide resolved
...tegration-test/java/tech/pegasys/pantheon/consensus/ibft/support/RoundSpecificNodeRoles.java
Outdated
Show resolved
Hide resolved
…framework_encapsulation
…framework_encapsulation
…framework_encapsulation
…framework_encapsulation
…framework_encapsulation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely better than previous.
* Refactoring for more readable IBFT IT * Renaming Roles to peers * Moving the assert behaviour into the RoundChangePeers * Renmaing prefix of assert to verify, grammar * Reducing usage of getAllPeers() * Dropping the getter for the peer list * Dropping peer from method names, as it's now in the class name * Spotless
A key goal of maintainable tests come from readability, any time the mental effort needed to understand the intent of the test, the better the chance of proper maintenance.
By removing the getter to the list of non proposing validators, I believe it creates a slightly nicer to read integration test.
this:
changes into: