test: Add HTTP test for deep JSON in repository index requests#8745
test: Add HTTP test for deep JSON in repository index requests#8745
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new HTTP QA regression test intended to ensure Triton’s /v2/repository/index request handling remains robust (and the server stays live) when presented with extremely deeply nested JSON input.
Changes:
- Add a new Python HTTP test that posts a deeply-nested JSON payload to
/v2/repository/indexand verifies the server remains live. - Update the L0 HTTP test harness to expect one additional Python unit test.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
qa/L0_http/test.sh |
Bumps expected Python test count from 13 to 14 to include the new test. |
qa/L0_http/http_test.py |
Adds test_repository_index_deeply_nested_json to exercise deep JSON parsing on repository index requests and then checks liveness. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self.assertEqual( | ||
| 500, | ||
| response.status_code, | ||
| "Expected repository index request to fail on invalid 'ready' type.", | ||
| ) |
There was a problem hiding this comment.
Assertion of error message was missing.
There was a problem hiding this comment.
Added error message assertion.
| timeout=60, | ||
| ) | ||
| self.assertEqual( | ||
| 500, |
There was a problem hiding this comment.
Why 500 server error instead of 400 bad request?
There was a problem hiding this comment.
Thank you for the note. Updated server to return 400 if a non-boolean value is provided.
What does the PR do?
This PR adds a new HTTP QA regression test intended to ensure Triton’s
/v2/repository/indexrequest handling remains robust (and the server stays live) when presented with extremely deeply nested JSON input.Checklist
<commit_type>: <Title>Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs: triton-inference-server/common#156
Where should the reviewer start?
Test plan:
Caveats:
Background
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)