-
Notifications
You must be signed in to change notification settings - Fork 839
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
BESU-146 - return better gas estimate service error message if possible #436
Conversation
Signed-off-by: Anthony Buckle <anthonybuckle@gmail.com>
Signed-off-by: Anthony Buckle <anthonybuckle@gmail.com>
It would be good to see an addition test in |
Hi CjHare, Thanks for the feedback and no problem. Are you referring to the case where gasEstimateResponse(requestContext) fails and returns a null value. That would lead line 68 orElse(errorResponse(requestContext, JsonRpcError.INTERNAL_ERROR)) returning an error response. It would need a test case. Do you know any good ways to make gasEstimateResponse(requestContext) fail in the test cases using when().thenReturn(). Those methods are private in the class. |
Ah, actually I was thinking a test for the flow that goes through line 93 (the replacement of The case you raise is a also good one, let me ponder over it 🤔 |
@anthonybuckle, I suspect the case you mention (the |
This test would cover the additional flow incorporating the simulation validation result 🙂
|
Signed-off-by: Anthony Buckle <anthonybuckle@gmail.com>
af1e76a
to
27d870b
Compare
Signed-off-by: Anthony Buckle <anthonybuckle@gmail.com>
Hi @CjHare, I confirmed that test case shouldReturnErrorWhenTransientTransactionProcessorReturnsEmpty does handle the orElse() case. I also added the exceeds balance test case as you suggested. Thanks for your help. Cheers. |
@anthonybuckle if you'd like this change included in the release notes, please add a line about it to the changelog. Thanks! |
@timbeiko Sure no problem. A PR for the updated changelog is here: #451 |
Signed-off-by: Anthony Buckle anthonybuckle@gmail.com
PR description
Here is a suggestion to improve gas estimate service error messages concerning jira ticket BESU-146.
Fixed Issue(s)
Fixes: https://jira.hyperledger.org/browse/BESU-146