From 20941a0a0e284fad9d3c89af24fcfee9a7fd1ebb Mon Sep 17 00:00:00 2001 From: JackyWoo Date: Wed, 10 Apr 2024 10:21:08 +0800 Subject: [PATCH 1/2] Fix flaky test test_four_word_command --- tests/integration/test_four_word_command/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_four_word_command/test.py b/tests/integration/test_four_word_command/test.py index 537f94031f..55fd4b5c6b 100644 --- a/tests/integration/test_four_word_command/test.py +++ b/tests/integration/test_four_word_command/test.py @@ -441,8 +441,9 @@ def test_cmd_crst(started_cluster): print(data) # 2 connections, 1 for 'cons' command, 1 for zk + # but if there is reconnection len(cons) may large than 2 cons = [n for n in data.split('\n') if len(n) > 0] - assert len(cons) == 2 + assert len(cons) >= 2 zk_con = None if 'sid' in cons[0]: From e3c9fcef81707ab7cc3ed3ad7aa40993ba26ed40 Mon Sep 17 00:00:00 2001 From: JackyWoo Date: Wed, 10 Apr 2024 10:34:01 +0800 Subject: [PATCH 2/2] Update the reason of flaky test --- tests/integration/test_four_word_command/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_four_word_command/test.py b/tests/integration/test_four_word_command/test.py index 55fd4b5c6b..c172873367 100644 --- a/tests/integration/test_four_word_command/test.py +++ b/tests/integration/test_four_word_command/test.py @@ -441,7 +441,7 @@ def test_cmd_crst(started_cluster): print(data) # 2 connections, 1 for 'cons' command, 1 for zk - # but if there is reconnection len(cons) may large than 2 + # but len(cons) may be large than 2, if the connection of `crst` is not destroied cons = [n for n in data.split('\n') if len(n) > 0] assert len(cons) >= 2