-
Notifications
You must be signed in to change notification settings - Fork 0
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
Directly use InputStream for parsing response JSON. #144
Conversation
* Remove unused constructor. * Re-enable constraint failure E2E test. * Add new equality methods.
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.
A few required and a few optional pieces of feedback.
In the desc, you say:
QueryTags parse method was incorrectly expecting an array
I don't see a parse method in main. AFAICT, the QueryTags deserializer was doing the right thing expecting a comma-delimited key-value pair syntax (foo=bar,baz=moo
)
src/main/java/com/fauna/exception/ConstraintFailureException.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Lucas Pedroza <[email protected]>
Co-authored-by: Lucas Pedroza <[email protected]>
Co-authored-by: Lucas Pedroza <[email protected]>
Description
This change is a big refactor and the main party trick is that we can use
HttpResponse<InputStream
and then pass that to FaunaParser instead of having to dotoString -> ObjectMapper.read(..)
.Some other things are mixed in here like some follow-on fixes from the previous PR #143 and the QueryTags
parse
method was incorrectly expecting an array, I've implemented an E2E test to verify that thea=b,c=d
format is what we really get.I expect to have a follow-on PR that will completely remove ConstraintFailureWire, ErrorInfoWire and QueryResponseWire, associated dead code, and refactor the tests. I stopped short of doing that in this PR because a lot of tests need to be changed.
Motivation and context
I started out with the goal of removing ObjectMapper and the associated
*Wire
classes (ConstraintFailureWire, ErrorInfoWire, and QueryResponseWire) and I didn't get all the way there, but this PR is already pretty big.How was the change tested?
Many modified unit tests, and I added some E2E tests.
Screenshots (if appropriate):
Change types
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.