-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: solder test input wire for TurleTests to StateSignatureCollector output wire #17864
base: main
Are you sure you want to change the base?
test: solder test input wire for TurleTests to StateSignatureCollector output wire #17864
Conversation
…sEngine Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
…mponent-to-collect-rounds-from-ConsensusEngine
…mponent-to-collect-rounds-from-ConsensusEngine # Conflicts: # platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/turtle/runner/TurtleNode.java Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
…mponent-to-collect-rounds-from-ConsensusEngine
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
…collect-rounds-from-ConsensusEngine' into 17639-connect-test-component-to-StateSignatureCollector-output
…r output wire Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
…mponent-to-collect-rounds-from-ConsensusEngine
…collect-rounds-from-ConsensusEngine' into 17639-connect-test-component-to-StateSignatureCollector-output
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 17638-connect-test-component-to-collect-rounds-from-ConsensusEngine #17864 +/- ##
=========================================================================================================
- Coverage 69.00% 69.00% -0.01%
- Complexity 23035 23037 +2
=========================================================================================================
Files 2654 2654
Lines 99668 99675 +7
Branches 10287 10287
=========================================================================================================
+ Hits 68775 68779 +4
- Misses 26993 27002 +9
+ Partials 3900 3894 -6
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
…mponent-to-collect-rounds-from-ConsensusEngine
…atformBuilder Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
…mponent-to-collect-rounds-from-ConsensusEngine
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
…mponent-to-collect-rounds-from-ConsensusEngine
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
…mponent-to-collect-rounds-from-ConsensusEngine
…mponent-to-collect-rounds-from-ConsensusEngine
…collect-rounds-from-ConsensusEngine' into 17639-connect-test-component-to-StateSignatureCollector-output # Conflicts: # platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/builder/PlatformComponentBuilder.java # platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/turtle/runner/TurtleNode.java Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
…mponent-to-StateSignatureCollector-output # Conflicts: # platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/PlatformWiring.java # platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/turtle/runner/TurtleNode.java # platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/turtle/consensus/ConsensusRoundsHolder.java # platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/turtle/consensus/ConsensusRoundsListContainer.java Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
Signed-off-by: Ivan Kavaldzhiev <ivankavaldzhiev@gmail.com>
* @return the wiring for the state signature collector | ||
*/ | ||
@NonNull | ||
public OutputWire<List<ReservedSignedState>> getStateSignatureCollectorWiring() { |
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.
we cannot use the output of the collector directly, it needs to go through a reserver first
final List<ReservedSignedState> collectedSignedStates = new ArrayList<>(); | ||
|
||
@Override | ||
public void interceptSignedStates(@NonNull final List<ReservedSignedState> signedStates) { | ||
if (!signedStates.isEmpty()) { | ||
collectedSignedStates.addAll(signedStates); | ||
} | ||
} |
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.
we should not keep these signed states for the whole run, this could lead to a OOM
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.
Agree, I think this issue is also relevant in this PR
Description:
This PR defines a test component inside TurtleTests and wires it to collect ReservedSignedStates coming from StateSignatureCollector.
Related issue(s):
Fixes #17639
Notes for reviewer:
Checklist