From f0c5ee91dd28c83302833c56dbe0339fb8391a19 Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Wed, 30 Oct 2024 08:39:53 +0200 Subject: [PATCH] chore: print info stats if test_noreply_pipeline fails --- tests/dragonfly/pymemcached_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/dragonfly/pymemcached_test.py b/tests/dragonfly/pymemcached_test.py index 219d7451b266..d3d035b39ae4 100644 --- a/tests/dragonfly/pymemcached_test.py +++ b/tests/dragonfly/pymemcached_test.py @@ -4,6 +4,7 @@ import socket import random import time +import warnings from . import dfly_args from .instance import DflyInstance @@ -67,7 +68,9 @@ def test_noreply_pipeline(df_server: DflyInstance, memcached_client: MCClient): assert memcached_client.get_many(keys) == {k: v.encode() for k, v in zip(keys, values)} info = Redis(port=df_server.port).info() - assert info["total_pipelined_commands"] > 0 # sometimes CI is slow + if info["total_pipelined_commands"] == 0: + warnings.warn("No pipelined commands were detected. Info: \n" + str(info)) + assert False, "No pipelined commands were detected." @dfly_args(DEFAULT_ARGS)