Skip to content
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

add unit test for common/deliverclient/blocksprovider/delivery_requester #4798

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

solo-daemon
Copy link
Contributor

  • Test update

Description

fix #4567
Added unit test for deliveryRequester.

@solo-daemon solo-daemon requested a review from a team as a code owner April 7, 2024 00:11
Signed-off-by: Amrit Prakash <amritdevil1st@gmail.com>
Signed-off-by: Amrit Prakash <amritdevil1st@gmail.com>
@denyeart
Copy link
Contributor

denyeart commented Apr 8, 2024

@tock-ibm Could you review?

Copy link
Contributor

@tock-ibm tock-ibm Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@solo-daemon
First of all thanks for this contribution!
This style of "fake mocks" based testing is good. The deliverer and bft_deliverer are tested this way. I will accept all the tests written here.
However, the issue calls for a more explicit style of testing - against a real gRPC service (a mockup for testing, not a real orderer).
See for example how it's done here: orderer/common/cluster/deliver_test.go where there is a deliverServer that implements the "Deliver" API. You can copy the deliverServer from there, and run the DeliveryRequester against it.

@tock-ibm tock-ibm merged commit 559a3dc into hyperledger:main Apr 17, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BFT Block Puller: unit test the DeliveryRequester
3 participants