From 3dfdd577e772e601de13dc7830f2a135cbdb8d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Fri, 6 Jan 2023 18:22:25 +0545 Subject: [PATCH] tests: xfail experiments-related flakey tests --- tests/func/experiments/__init__.py | 14 ++++++++++++++ tests/func/experiments/test_experiments.py | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/tests/func/experiments/__init__.py b/tests/func/experiments/__init__.py index e69de29bb2..410cc6f2c0 100644 --- a/tests/func/experiments/__init__.py +++ b/tests/func/experiments/__init__.py @@ -0,0 +1,14 @@ +import json + +import pytest + +pytestmark = pytest.mark.xfail( + raises=( + # looks like dvc-task is not saving json atomically + json.JSONDecodeError, + # needs investigation, maybe a file locking issue? + PermissionError, + ), + strict=False, + reason="See https://github.com/iterative/dvc/issues/8570", +) diff --git a/tests/func/experiments/test_experiments.py b/tests/func/experiments/test_experiments.py index 4b2a05ee24..5a6ecbe537 100644 --- a/tests/func/experiments/test_experiments.py +++ b/tests/func/experiments/test_experiments.py @@ -4,6 +4,8 @@ import stat from textwrap import dedent +import dulwich.errors +import dulwich.file import pytest from funcy import first @@ -137,6 +139,14 @@ def test_apply(tmp_dir, scm, dvc, exp_stage): assert (tmp_dir / "metrics.yaml").read_text().strip() == "foo: 3" +@pytest.mark.xfail( + raises=( + dulwich.errors.CommitError, + dulwich.file.FileLocked, + ), + strict=False, + reason="See https://github.com/iterative/dvc/issues/8570", +) def test_apply_failed(tmp_dir, scm, dvc, failed_exp_stage, test_queue): from dvc.exceptions import InvalidArgumentError