-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Implement consumer handler in the Simulator #360
feat: Implement consumer handler in the Simulator #360
Conversation
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.
I left a few suggestions
simulator/src/main/java/com/hedera/block/simulator/BlockStreamSimulatorApp.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/BlockStreamSimulatorApp.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/BlockStreamSimulatorApp.java
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/mode/ConsumerModeHandler.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/generator/BlockStreamManager.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/generator/BlockAsFileLargeDataSets.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/grpc/impl/ConsumerStreamGrpcClientImpl.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/grpc/impl/ConsumerStreamObserver.java
Outdated
Show resolved
Hide resolved
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.
@georgi-l95 generally looks good on my first pass! It is nice to see a clear distinction of different components.
I do have some comments left here and there.
Also, please consider to write javadocs for the tests, since it is not possible to see what is the intent of the test and it is very hard to review them.
simulator/src/main/java/com/hedera/block/simulator/BlockStreamSimulatorApp.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/BlockStreamSimulatorApp.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/BlockStreamSimulatorApp.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/BlockStreamSimulatorApp.java
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/BlockStreamSimulatorApp.java
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/mode/ConsumerModeHandler.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/mode/ConsumerModeHandler.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/mode/PublisherModeHandler.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/mode/PublisherModeHandler.java
Outdated
Show resolved
Hide resolved
simulator/src/test/java/com/hedera/block/simulator/mode/ConsumerModeHandlerTest.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/grpc/impl/ConsumerStreamGrpcClientImpl.java
Outdated
Show resolved
Hide resolved
8ac1a91
to
b802207
Compare
Signed-off-by: georgi-l95 <[email protected]>
Signed-off-by: georgi-l95 <[email protected]> chore: fix unit tests Signed-off-by: georgi-l95 <[email protected]>
Signed-off-by: georgi-l95 <[email protected]> test: add unit tests Signed-off-by: georgi-l95 <[email protected]> test: add unit tests Signed-off-by: georgi-l95 <[email protected]>
Signed-off-by: georgi-l95 <[email protected]> add temporary code Signed-off-by: georgi-l95 <[email protected]> fix unit tests Signed-off-by: georgi-l95 <[email protected]> fix loading block manager in consumer mode Signed-off-by: georgi-l95 <[email protected]>
Signed-off-by: georgi-l95 <[email protected]> remove wildcard import Signed-off-by: georgi-l95 <[email protected]> address feedback Signed-off-by: georgi-l95 <[email protected]> address feedback Signed-off-by: georgi-l95 <[email protected]> address feedback Signed-off-by: georgi-l95 <[email protected]>
Signed-off-by: georgi-l95 <[email protected]>
Signed-off-by: georgi-l95 <[email protected]>
10b59e7
to
40aca65
Compare
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.
Looks good @georgi-l95 !
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.
Looks good
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
============================================
- Coverage 97.23% 96.96% -0.27%
- Complexity 375 395 +20
============================================
Files 76 79 +3
Lines 1338 1417 +79
Branches 91 93 +2
============================================
+ Hits 1301 1374 +73
- Misses 28 32 +4
- Partials 9 11 +2
|
Description:
This pull request aims to make use of the consumer mode in the simulator, by adding needed implementations.
We add:
SubscribeStreamRequest
andSubscribeStreamResponse
, which are part of thesubscribeBlockStream
rpc.Related issue(s):
Fixes #121
Notes for reviewer:
Checklist