From 825b9879c8082125ae6d1d2acbf2156ffcc6d89a Mon Sep 17 00:00:00 2001 From: nicolargo Date: Mon, 30 Dec 2024 11:57:11 +0100 Subject: [PATCH] Disable Renovate for Lock file --- pyproject.toml | 3 ++- renovate.json | 3 ++- tests/test_memoryleak.py | 12 ++++++------ tests/test_perf.py | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cceca83169..80c387c6bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -238,7 +238,8 @@ build-backend = "setuptools.build_meta" requires = ["setuptools>=68"] [tool.pytest.ini_options] -log_cli = true +# Set to true to display live message during tests +log_cli = false log_level = "INFO" #log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)" #log_cli_date_format = "%Y-%m-%d %H:%M:%S" diff --git a/renovate.json b/renovate.json index 4b6245c5c4..2e74c27be4 100644 --- a/renovate.json +++ b/renovate.json @@ -3,5 +3,6 @@ "extends": [ "config:recommended" ], - "prHourlyLimit": 3 + "prHourlyLimit": 3, + "updateLockFiles": false } diff --git a/tests/test_memoryleak.py b/tests/test_memoryleak.py index 989d7b35c0..dc020e970e 100755 --- a/tests/test_memoryleak.py +++ b/tests/test_memoryleak.py @@ -13,21 +13,21 @@ import tracemalloc -def test_memoryleak(glances_stats_no_history, logger): +def test_memoryleak_no_history(glances_stats_no_history, logger): """ Test Glances memory leak. """ tracemalloc.start() # First iterations just to init the stats and fill the memory - logger.info('Please wait test is filling memory with stats') - iteration = 10 + logger.info('Please wait during memory leak test initialisation') + iteration = 3 for _ in range(iteration): glances_stats_no_history.update() time.sleep(1) # Then iteration to measure memory leak - logger.info('Please wait test if a memory leak is detected') - iteration = 20 + logger.info('Please wait during memory leak test') + iteration = 10 snapshot_begin = tracemalloc.take_snapshot() for _ in range(iteration): glances_stats_no_history.update() @@ -36,4 +36,4 @@ def test_memoryleak(glances_stats_no_history, logger): snapshot_diff = snapshot_end.compare_to(snapshot_begin, 'filename') memory_leak = sum([s.size_diff for s in snapshot_diff]) // iteration logger.info(f'Memory consume per iteration: {memory_leak} bytes') - assert memory_leak < 1000, f'Memory leak: {memory_leak} bytes' + assert memory_leak < 15000, f'Memory leak: {memory_leak} bytes' diff --git a/tests/test_perf.py b/tests/test_perf.py index d9dfb65629..eb88914aa2 100755 --- a/tests/test_perf.py +++ b/tests/test_perf.py @@ -16,9 +16,9 @@ def test_perf_update(glances_stats): """ Test Glances perf. """ - perf_timer = Timer(3) + perf_timer = Timer(6) counter = 0 while not perf_timer.finished(): glances_stats.update() counter += 1 - assert counter > 3 + assert counter > 6