From 43e34f81dc7cd371e32ef7f1036b6a8b7e9aa522 Mon Sep 17 00:00:00 2001 From: Zhengda Lu Date: Wed, 23 Oct 2024 09:14:08 -0400 Subject: [PATCH] relax MEMORY_USAGE_THRESHOLD in test to account for slightly increased mem from tracing (#18890) * reset peak before trace mem * increase test mem threshold to account for additional mem from trace * add comments --- datadog_checks_base/tests/base/utils/db/test_db_statements.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datadog_checks_base/tests/base/utils/db/test_db_statements.py b/datadog_checks_base/tests/base/utils/db/test_db_statements.py index 53dfb05845545..00dc3fc5f2c5a 100644 --- a/datadog_checks_base/tests/base/utils/db/test_db_statements.py +++ b/datadog_checks_base/tests/base/utils/db/test_db_statements.py @@ -277,7 +277,8 @@ def test_compute_derivative_rows_mem_usage(self): Make sure we minimize the temporary objects created when computing the derivative This test is skipped if tracemalloc is not available ''' - MEMORY_USAGE_THRESHOLD = 7 * 1024 * 1024 # 7 MB + # The memory usage threshold takes tracing overhead into account + MEMORY_USAGE_THRESHOLD = 8 * 1024 * 1024 # 8 MB try: import tracemalloc