From 3d3c0e35eb72e786faf56d30a81204d6820746fa Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 18 Sep 2024 11:55:45 -0400 Subject: [PATCH] tests: use logger.warning not logger.warn Apparently logger.warn is being deprecated. So let's switch over to logger.warning. Clearly it's better Signed-off-by: Donald Sharp --- tests/topotests/lib/common_config.py | 2 +- tests/topotests/lib/topotest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 540a627c6543..cb71112af362 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -936,7 +936,7 @@ def generate_support_bundle(): tgen = get_topogen() if tgen is None: - logger.warn( + logger.warning( "Support bundle attempted to be generated, but topogen is not being used" ) return True diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index dc6107bbef42..d15fefc0390e 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -424,7 +424,7 @@ def run_and_expect(func, what, count=20, wait=3): minimum_wait_time = 15 # The overall minimum seconds for the test to wait wait_time = wait * count if wait_time < minimum_wait_time: - logger.warn( + logger.warning( f"Waiting time is too small (count={count}, wait={wait}), using default values (count={minimum_count}, wait={minimum_wait})" ) count = minimum_count