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 binary compatibility tests #15822

Merged
merged 1 commit into from Oct 25, 2019

Conversation

@mdumandag
Copy link
Member

mdumandag commented Oct 18, 2019

This PR adds the binary compatibility tests for the client protocol.

We test the behaviour of the client and member separately.

For the client side, we do the following on the tests:

For each codec

  • We encode the request using the codec and compare the client message generated with it to the client message generated by the protocol binary test generator.

  • We decode the response using the codec from the client message generated by the protocol binary test generator. After decoding it, we compare each parameter of the response with the predefined reference objects.

  • If there are any events related to codec, we pass the client message generated by the protocol binary test generator to the event handler class and compare the parameters of the event with the predefined reference objects.

For the member side, we do the reverse of the things we have done for the client side. Namely, we decode the request, encode the response and encode the event and compare them to the contents of the binary file as described above.

Also, there are two separate tests where we use null values in the nullable parameters.

See the templates on the protocol repo for the details of the client message comparison.

Protocol PR: hazelcast/hazelcast-client-protocol#252

@mdumandag mdumandag added this to the 4.0 milestone Oct 18, 2019
@mdumandag mdumandag requested a review from hazelcast/clients as a code owner Oct 18, 2019
@mdumandag mdumandag self-assigned this Oct 18, 2019
@sancar
sancar approved these changes Oct 22, 2019
@mdumandag mdumandag force-pushed the mdumandag:binary-compatibility-tests branch from 61a83c8 to b52cd2b Oct 24, 2019
@mdumandag

This comment has been minimized.

Copy link
Member Author

mdumandag commented Oct 25, 2019

run-lab-run

@mdumandag mdumandag merged commit 022237a into hazelcast:master Oct 25, 2019
1 check passed
1 check passed
default Test PASSed.
Details
@mdumandag mdumandag deleted the mdumandag:binary-compatibility-tests branch Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.