-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[serve] Add tests for HTTP status code is_error
logic
#48822
Conversation
…es/better-access-log
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
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.
LGTM!
def test_proxy_metrics_websocket_status_code_is_error(serve_start_shutdown): | ||
"""Verify that status codes aisde from 1000 or 1001 are errors.""" | ||
|
||
def check_request_count_metrics( |
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.
Non-blocker nit: Can probably refactor this and share with the other test
code=status_code, | ||
# All status codes are considered errors aside from: | ||
# 1000 (CLOSE_NORMAL), 1001 (CLOSE_GOING_AWAY). | ||
is_error=status_code not in ["1000", "1001"], |
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.
Non-blocker nit: can refactor this into a small helper 🙃
…48822) Adds tests for: ray-project#47896 (and some stylistic refactoring). --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Signed-off-by: Connor Sanders <connor@elastiflow.com>
…48822) Adds tests for: ray-project#47896 (and some stylistic refactoring). --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Signed-off-by: hjiang <dentinyhao@gmail.com>
Why are these changes needed?
Adds tests for: #47896 (and some stylistic refactoring).
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.