chore: print info stats if test_noreply_pipeline fails (#4016)

This commit is contained in:
Roman Gershman 2024-10-30 10:17:15 +02:00 committed by GitHub
parent 6f6897cef1
commit c8b56b69b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@ from redis import Redis
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)