-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(test): disable encoded response/request check when map contains multiple elements #2013
fix(test): disable encoded response/request check when map contains multiple elements #2013
Conversation
f05103e
to
6d470cc
Compare
Thanks for looking at this. The change here does fix the test, although if we do want the result to always be reproducible you'd want to sort the parent topic names as well as that is also a map isn't it? However, it does also raise the question of: "do we want to be sorting/ordering the protocol responses to make testing easier, when the clients themselves don't care?" — I wonder if we should change our comparison method in our tests |
Since iteration order on map is randomized the encoded response is variable and cannot be checked against a fixed byte array. |
If we do as in offset_commit_response_test.go the result would be : |
@faillefer yeah I think that’s the best option for now |
…ments. In that situation the encoded/request response varies because of unpredictable map traversal order
6d470cc
to
da3178f
Compare
@dnwe i've updated the branch associated to this merge request. |
…offset-response fix(test): disable encoded response/request check when map contains multiple elements
Fix #2012
Disable encoded response/request check when map contains multiple elements. In that situation the encoded/request response varies because of unpredictable map traversal order