-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Show what do not match #3012
Show what do not match #3012
Conversation
Signed-off-by: gqqnbig <[email protected]>
Let me know if you like the idea. I know unit tests are failing. If the change is ok, I will spend more time on fixing the tests. |
Signed-off-by: gqqnbig <[email protected]>
@yacovm I've revised to print base64. |
Signed-off-by: gqqnbig <[email protected]>
@yacovm I find TestWithStaticDeliverClientLeader failed. Can you help with that? |
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.
--- FAIL: TestEndorse (0.10s)
--- FAIL: TestEndorse/non-matching_responses (0.00s)
api_test.go:1768:
Error Trace: api_test.go:1768
api_test.go:833
Error: Error message not equal:
expected: "rpc error: code = Aborted desc = failed to assemble transaction: ProposalResponsePayloads do not match (base64):"
actual : "rpc error: code = Aborted desc = failed to assemble transaction: ProposalResponsePayloads do not match (base64): 'EhQaEgjIARoNbW9ja19yZXNwb25zZQ==' vs 'EhkaFwjIARoSZGlmZmVyZW50X3Jlc3BvbnNl'"
Signed-off-by: gqqnbig <[email protected]>
Head branch was pushed to by a user without write access
Signed-off-by: gqqnbig [email protected]
Type of change
Description
When
peer chaincode invoke
submits a request, if chaincode has bugs, it may return different responses on different nodes.Before, the error message is like
That is it. Developers have no idea what mismatch what.
Now, with this PR, the error message is like
With this error message, developers can use text comparison tools to find out where the two responses start to differ, and they may get some cues.
Technically, only the payload part needs to be displayed, but I don't know how to format bytes as the toString method of ProposalResponse does.