Skip to content

Commit dccb4ee

Browse files
committed
test: skip tests on unsupported platforms to improve CI reliability
Signed-off-by: catfish <[email protected]>
1 parent acb4a9b commit dccb4ee

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/flytekit/unit/core/test_container_task.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ def test_container_task_image_spec(mock_image_spec_builder):
243243
assert pod.pod_spec["containers"][0]["image"] == image_spec_1.image_name()
244244
assert pod.pod_spec["containers"][1]["image"] == image_spec_2.image_name()
245245

246+
@pytest.mark.skipif(
247+
sys.platform in ["darwin", "win32"],
248+
reason="Skip if running on windows or macos due to CI Docker environment setup failure",
249+
)
246250
def test_container_task_timeout():
247251
ct_with_timedelta = ContainerTask(
248252
name="timedelta-timeout-test",
@@ -254,7 +258,10 @@ def test_container_task_timeout():
254258
with pytest.raises((docker.errors.APIError, Exception)):
255259
ct_with_timedelta.execute()
256260

257-
261+
@pytest.mark.skipif(
262+
sys.platform in ["darwin", "win32"],
263+
reason="Skip if running on windows or macos due to CI Docker environment setup failure",
264+
)
258265
def test_container_task_timeout_k8s_serialization():
259266

260267
ps = V1PodSpec(
@@ -279,7 +286,12 @@ def test_container_task_timeout_k8s_serialization():
279286
k8s_pod_timedelta = ct_timedelta.get_k8s_pod(default_serialization_settings)
280287
assert k8s_pod_timedelta.pod_spec["activeDeadlineSeconds"] == 120
281288

282-
def test_container_task_no_timeout():
289+
290+
@pytest.mark.skipif(
291+
sys.platform in ["darwin", "win32"],
292+
reason="Skip if running on windows or macos due to CI Docker environment setup failure",
293+
)
294+
def test_container_task_within_timeout():
283295
ct_timedelta = ContainerTask(
284296
name="no-timeout-task",
285297
input_data_dir="/var/inputs",

0 commit comments

Comments
 (0)