-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 client version verification test. #3032
Conversation
0b30f92
to
9ce8711
Compare
graph_spaces["resp"] = conn.verifyClientVersion(req) | ||
conn._iprot.trans.close() | ||
|
||
@then(parse("the connection should be rejected")) |
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.
Should specify the message since other errors would also cause the connection to be rejected? We could parse something like Connection rejected because of client version mismtach
@then(parse("the connection should be rejected")) | ||
def check_client_compatible(graph_spaces): | ||
resp = graph_spaces["resp"] | ||
assert resp.error_code == ErrorCode.E_CLIENT_SERVER_INCOMPATIBLE, f'The client was not rejected by server: {resp}' |
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.
The client might be rejected for other errors. f'Expected error: ErrorCode.E_CLIENT_SERVER_INCOMPATIBLE, got : {resp.error_code}'
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.
Generally LGTM.
Codecov Report
@@ Coverage Diff @@
## master #3032 +/- ##
==========================================
- Coverage 84.20% 84.19% -0.01%
==========================================
Files 1287 1287
Lines 115319 115319
==========================================
- Hits 97100 97098 -2
- Misses 18219 18221 +2
Continue to review full report at Codecov.
|
Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>
After vesoft-inc/nebula-python#148