Bft soak test: run qbft only by default#9863
Bft soak test: run qbft only by default#9863macfarla wants to merge 7 commits intohyperledger:mainfrom
Conversation
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR separates BFT soak tests by consensus mechanism, allowing targeted testing of QBFT, IBFT2, or both. By default, only QBFT tests are run.
Changes:
- Added consensus-type workflow input with QBFT as the default
- Forwarded acctests.consensusType system property to test JVM
- Filtered parameterized test factory based on consensus type
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/bft-soak-test.yml | Added consensus-type input with QBFT default and updated artifact names to include consensus type |
| acceptance-tests/tests/build.gradle | Forwarded acctests.consensusType system property to both acceptanceTest and acceptanceTestBftSoak targets |
| acceptance-tests/tests/src/acceptanceTest/java/org/hyperledger/besu/tests/acceptance/bft/ParameterizedBftTestBase.java | Implemented filtering logic to run tests for specific consensus type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| public static Stream<Arguments> factoryFunctions() { | ||
| final String consensusType = System.getProperty("acctests.consensusType"); | ||
| if (consensusType != null && !consensusType.isEmpty() && !consensusType.equals("all")) { |
There was a problem hiding this comment.
The condition checks for null, empty, and 'all' separately. Consider using isBlank() instead of separate null and isEmpty checks for cleaner code: if (consensusType != null && !consensusType.isBlank() && !consensusType.equals(\"all\"))
| if (consensusType != null && !consensusType.isEmpty() && !consensusType.equals("all")) { | |
| if (consensusType != null && !consensusType.isBlank() && !consensusType.equals("all")) { |
| final String consensusType = System.getProperty("acctests.consensusType"); | ||
| if (consensusType != null && !consensusType.isEmpty() && !consensusType.equals("all")) { | ||
| return BftAcceptanceTestParameterization.getFactories() | ||
| .filter(args -> consensusType.equals(args.get()[0])); |
There was a problem hiding this comment.
The filter condition assumes the first element of the arguments array is the consensus type. Consider adding a comment explaining this assumption or using a named constant for the array index to improve code clarity.
PR description
Separate the BFT soak test by consensus mechanism (qbft, ibft2, all). By default run QBFT only.
Follow up to #9846
Files changed:
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests