-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(request-debug): improve integration tests (#11692)
* tests(request-debug): only initialize DB once in test setup This updates the test setup logic such that helpers.get_db_utils() is only invoked once per test DB strategy. BEFORE: ======= 30 tests from 1 test file ran. (64157.77 ms total) AFTER: ======= 30 tests from 1 test file ran. (52507.36 ms total) * tests(request-debug): truncate error.log before request This updates the tests to truncate the error.log file before making a request that will generate a log entry. The goal is to reduce the overall amount of bytes that must be read from disk and searched through. * tests(request-debug): use line-wise parser for log entries This updates the request debug log entry logic to use `io.lines()` rather than reading the whole file at once. This improves performance and memory usage in the worst-case scenarios of the function. * tests(request-debug): ensure client connection is closed
- Loading branch information
Showing
1 changed file
with
73 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5f88f20
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.
Bazel Build
Docker image available
kong/kong:5f88f20844510b36d5c98f1deeb34d04168ed39e
Artifacts available https://github.com/Kong/kong/actions/runs/6407389585