hashgraph / hedera-block-node

New Block Node services
Apache License 2.0
23 stars 3 forks source link

test: Add E2E test and enhance simulator flexibility #330

Closed georgi-l95 closed 1 week ago

georgi-l95 commented 2 weeks ago

Description: This PR adds new functionality aimed at making the simulator a better and more flexible test driver for E2E tests. It achieves this by:

Related issue(s):

Fixes #186

Notes for reviewer:

Checklist

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.62%. Comparing base (2e4d26b) to head (b4d0ef5). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #330 +/- ## ============================================ + Coverage 94.05% 94.62% +0.57% - Complexity 300 316 +16 ============================================ Files 68 69 +1 Lines 1177 1228 +51 Branches 82 84 +2 ============================================ + Hits 1107 1162 +55 + Misses 57 55 -2 + Partials 13 11 -2 ``` | [Files with missing lines](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | Coverage Δ | | |---|---|---| | [...a/com/hedera/block/common/utils/Preconditions.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=common%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fcommon%2Futils%2FPreconditions.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9jb21tb24vdXRpbHMvUHJlY29uZGl0aW9ucy5qYXZh) | `100.00% <100.00%> (ø)` | | | [...edera/block/simulator/BlockStreamSimulatorApp.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=simulator%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fsimulator%2FBlockStreamSimulatorApp.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-c2ltdWxhdG9yL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9zaW11bGF0b3IvQmxvY2tTdHJlYW1TaW11bGF0b3JBcHAuamF2YQ==) | `93.75% <100.00%> (+1.44%)` | :arrow_up: | | [...dera/block/simulator/config/data/StreamStatus.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=simulator%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fsimulator%2Fconfig%2Fdata%2FStreamStatus.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-c2ltdWxhdG9yL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9zaW11bGF0b3IvY29uZmlnL2RhdGEvU3RyZWFtU3RhdHVzLmphdmE=) | `100.00% <100.00%> (ø)` | | | [...ck/simulator/grpc/PublishStreamGrpcClientImpl.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=simulator%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fsimulator%2Fgrpc%2FPublishStreamGrpcClientImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-c2ltdWxhdG9yL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9zaW11bGF0b3IvZ3JwYy9QdWJsaXNoU3RyZWFtR3JwY0NsaWVudEltcGwuamF2YQ==) | `96.07% <100.00%> (+0.72%)` | :arrow_up: | | [...ra/block/simulator/grpc/PublishStreamObserver.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=simulator%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fsimulator%2Fgrpc%2FPublishStreamObserver.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-c2ltdWxhdG9yL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9zaW11bGF0b3IvZ3JwYy9QdWJsaXNoU3RyZWFtT2JzZXJ2ZXIuamF2YQ==) | `100.00% <100.00%> (ø)` | | | [.../block/simulator/metrics/SimulatorMetricTypes.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=simulator%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fsimulator%2Fmetrics%2FSimulatorMetricTypes.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-c2ltdWxhdG9yL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9zaW11bGF0b3IvbWV0cmljcy9TaW11bGF0b3JNZXRyaWNUeXBlcy5qYXZh) | `100.00% <100.00%> (ø)` | | | [...dera/block/simulator/mode/CombinedModeHandler.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=simulator%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fsimulator%2Fmode%2FCombinedModeHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-c2ltdWxhdG9yL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9zaW11bGF0b3IvbW9kZS9Db21iaW5lZE1vZGVIYW5kbGVyLmphdmE=) | `100.00% <100.00%> (ø)` | | | [...dera/block/simulator/mode/ConsumerModeHandler.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=simulator%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fsimulator%2Fmode%2FConsumerModeHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-c2ltdWxhdG9yL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9zaW11bGF0b3IvbW9kZS9Db25zdW1lck1vZGVIYW5kbGVyLmphdmE=) | `100.00% <100.00%> (ø)` | | | [...era/block/simulator/mode/PublisherModeHandler.java](https://app.codecov.io/gh/hashgraph/hedera-block-node/pull/330?src=pr&el=tree&filepath=simulator%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fblock%2Fsimulator%2Fmode%2FPublisherModeHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-c2ltdWxhdG9yL3NyYy9tYWluL2phdmEvY29tL2hlZGVyYS9ibG9jay9zaW11bGF0b3IvbW9kZS9QdWJsaXNoZXJNb2RlSGFuZGxlci5qYXZh) | `100.00% <100.00%> (+7.69%)` | :arrow_up: |

🚨 Try these New Features: