Skip to content

Commit 8cd19cb

Browse files
hanwen-clusterhanwen-pcluste
authored andcommitted
[integ-test] Skip fabtest in us-iso regions
Fabric tests require Internet connection, so cannot be run in us-iso regions. This test had been skipped, but was included as part of #6194 Signed-off-by: Hanwen <hanwenli@amazon.com>
1 parent a19c327 commit 8cd19cb

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

tests/integration-tests/tests/efa/test_efa.py

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,30 @@ def test_efa(
6868

6969
with soft_assertions():
7070
assert_no_errors_in_logs(remote_command_executor, scheduler, skip_ice=True)
71-
72-
# Run Fabric tests
73-
run_system_analyzer(cluster, scheduler_commands_factory, request, partition="efa-enabled")
74-
75-
fabtests_report = _execute_fabtests(remote_command_executor, test_datadir, instance)
76-
77-
num_tests = int(fabtests_report.get("testsuites", {}).get("@tests", None))
78-
num_failures = int(fabtests_report.get("testsuites", {}).get("@failures", None))
79-
num_errors = int(fabtests_report.get("testsuites", {}).get("@errors", None))
80-
81-
with soft_assertions():
82-
assert_that(num_tests, description="Cannot read number of tests from Fabtests report").is_not_none()
83-
assert_that(num_failures, description="Cannot read number of failures from Fabtests report").is_not_none()
84-
assert_that(num_errors, description="Cannot read number of errors from Fabtests report").is_not_none()
85-
86-
if num_failures + num_errors > 0:
87-
logging.info(f"Fabtests report:\n{fabtests_report}")
88-
89-
with soft_assertions():
90-
assert_that(num_failures, description=f"{num_failures}/{num_tests} libfabric tests are failing").is_equal_to(0)
91-
assert_that(num_errors, description=f"{num_errors}/{num_tests} libfabric tests got errors").is_equal_to(0)
92-
assert_no_errors_in_logs(remote_command_executor, scheduler)
71+
if "us-iso" not in region:
72+
# Run Fabric tests. Fabric tests require Internet connection, so cannot be run in us-iso regions
73+
run_system_analyzer(cluster, scheduler_commands_factory, request, partition="efa-enabled")
74+
75+
fabtests_report = _execute_fabtests(remote_command_executor, test_datadir, instance)
76+
77+
num_tests = int(fabtests_report.get("testsuites", {}).get("@tests", None))
78+
num_failures = int(fabtests_report.get("testsuites", {}).get("@failures", None))
79+
num_errors = int(fabtests_report.get("testsuites", {}).get("@errors", None))
80+
81+
with soft_assertions():
82+
assert_that(num_tests, description="Cannot read number of tests from Fabtests report").is_not_none()
83+
assert_that(num_failures, description="Cannot read number of failures from Fabtests report").is_not_none()
84+
assert_that(num_errors, description="Cannot read number of errors from Fabtests report").is_not_none()
85+
86+
if num_failures + num_errors > 0:
87+
logging.info(f"Fabtests report:\n{fabtests_report}")
88+
89+
with soft_assertions():
90+
assert_that(
91+
num_failures, description=f"{num_failures}/{num_tests} libfabric tests are failing"
92+
).is_equal_to(0)
93+
assert_that(num_errors, description=f"{num_errors}/{num_tests} libfabric tests got errors").is_equal_to(0)
94+
assert_no_errors_in_logs(remote_command_executor, scheduler)
9395

9496

9597
def _execute_fabtests(remote_command_executor, test_datadir, instance):

0 commit comments

Comments
 (0)