Skip to content

Commit 356b30a

Browse files
mayastor-borsAbhinandan-Purkait
andcommitted
Merge #1863
1863: fix: nexus multipath test to retry on resetting r=Abhinandan-Purkait a=Abhinandan-Purkait Co-authored-by: Abhinandan Purkait <[email protected]>
2 parents 666ed1b + 90326d8 commit 356b30a

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

io-engine/tests/nexus_crd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async fn run_nexus_manage_task(r: Receiver<()>, cfg: NexusManageTask) {
215215
add_fault_injection(ms_nex.clone(), &inj_r).await.unwrap();
216216

217217
// When nexus fails, I/O should be freezing due to CRD (if enabled).
218-
tokio::time::sleep(Duration::from_secs(2)).await;
218+
tokio::time::sleep(Duration::from_secs(3)).await;
219219

220220
// Destroy the nexus, remove injectios and re-create and re-publish the
221221
// nexus with the same ID.

test/python/common/nvme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def nvme_connect(uri, delay=10, tmo=600):
7070
)
7171
print(command)
7272
subprocess.run(command, check=True, shell=True, capture_output=False)
73-
time.sleep(1)
73+
time.sleep(3)
7474
command = "nix-sudo nvme list -v -o json"
7575
discover = json.loads(
7676
subprocess.run(

test/python/tests/nexus_multipath/test_bdd_nexus_multipath.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22
import logging
33
from pytest_bdd import given, scenario, then, when, parsers
4+
from retrying import retry
45

56
from common.command import run_cmd
67
from common.fio import Fio
@@ -375,6 +376,7 @@ def degrade_single_io_path(container_mod, a_client_connected_to_one_path_nexus):
375376
@then(
376377
"it should be possible to create a second nexus and connect it as the second path"
377378
)
379+
@retry(wait_fixed=10, stop_max_attempt_number=200)
378380
def check_add_second_io_path(create_1_replica_disconnected_nexus):
379381
# Connect the second nexus and check the paths.
380382
nexus2_uri = create_1_replica_disconnected_nexus
@@ -397,6 +399,7 @@ def check_add_second_io_path(create_1_replica_disconnected_nexus):
397399

398400

399401
@then("it should be possible to remove the first failed I/O path")
402+
@retry(wait_fixed=10, stop_max_attempt_number=200)
400403
def check_remove_the_degraded_path(a_client_connected_to_one_path_nexus):
401404
dev = a_client_connected_to_one_path_nexus
402405
desc = nvme_list_subsystems(dev)

test/python/tests/nexus_multipath/test_nexus_multipath.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
nvme_list_subsystems,
1515
nvme_resv_report,
1616
)
17+
from retrying import retry
1718

1819

1920
@pytest.fixture
@@ -336,6 +337,7 @@ def delay2():
336337

337338

338339
@pytest.fixture
340+
@retry(wait_fixed=10, stop_max_attempt_number=200)
339341
def verify_paths(connect_nexus):
340342
dev = connect_nexus
341343
desc = nvme_list_subsystems(dev)
@@ -446,6 +448,7 @@ def test_nexus_multipath_remove_3rd_path(
446448

447449

448450
@pytest.mark.timeout(60)
451+
@retry(wait_fixed=10, stop_max_attempt_number=200)
449452
def test_nexus_multipath_remove_all_paths(
450453
create_nexus_no_destroy,
451454
create_nexus_2_no_destroy,

0 commit comments

Comments
 (0)