From 6b789f9d0281aee39deefe2e6572ab7fe39105df Mon Sep 17 00:00:00 2001 From: Eric Weber Date: Thu, 14 Dec 2023 21:12:25 -0600 Subject: [PATCH] Fix test_disk_eviction_with_node_level_soft_anti_affinity_disabled (#1607) Longhorn 7210 Signed-off-by: Eric Weber --- manager/integration/tests/test_node.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manager/integration/tests/test_node.py b/manager/integration/tests/test_node.py index fef4a5b50b..0292ff7368 100644 --- a/manager/integration/tests/test_node.py +++ b/manager/integration/tests/test_node.py @@ -2626,6 +2626,14 @@ def test_disk_eviction_with_node_level_soft_anti_affinity_disabled(client, # NOQ replica_path = test_disk_path + '/replicas' assert os.path.isdir(replica_path) + # Since https://github.com/longhorn/longhorn-manager/pull/2138, the node + # controller is responsible for triggering replica eviction. If the timing + # of the node controller and node monitor are off, the node controller + # may take extra time to do so. Wait for evidence eviction is in progress + # before proceeding. + wait_for_volume_replica_count(client, volume.name, + volume.numberOfReplicas + 1) + for i in range(common.RETRY_COMMAND_COUNT): if len(os.listdir(replica_path)) > 0: break