Skip to content
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

tests(request-debug): improve integration tests #11692

Merged
merged 4 commits into from
Oct 4, 2023
Merged

Conversation

flrgh
Copy link
Contributor

@flrgh flrgh commented Oct 3, 2023

Summary

This includes several changes designed to make the request-debug test suite faster and less memory-intensive.

This test suite is occasionally triggering the OOMKiller in our Enterprise CI runs, and this changeset aims to stop the bleeding.

Checklist

Full changelog

  • de-dupe DB initialization calls (helpers.get_db_utils())
  • truncate error.log before running tests
  • search error.log line-by-line instead of all at once
  • ensure proxy client connections are closed in all branches

Issue reference

KAG-2710

flrgh added 4 commits October 3, 2023 12:02
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)
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.
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.
@locao locao merged commit 5f88f20 into master Oct 4, 2023
31 checks passed
@locao locao deleted the tests/request-debug branch October 4, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants