From 36a2bf472b8ba17cd73b91a8bc07563d1fc9ae09 Mon Sep 17 00:00:00 2001 From: Gao Date: Tue, 14 Sep 2021 23:44:20 +0800 Subject: [PATCH] Fix ci failures (#6609) The current ci failure was caused by wrong order of the experiments. Because our test script runs so fast that they might share the same commit timestamp, that makes them in an uncertain order. And then gives a wrong branch_base. --- tests/func/experiments/test_show.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/func/experiments/test_show.py b/tests/func/experiments/test_show.py index 55cfc11ad..a8e512700 100644 --- a/tests/func/experiments/test_show.py +++ b/tests/func/experiments/test_show.py @@ -495,6 +495,8 @@ def test_show_with_broken_repo(tmp_dir, scm, dvc, exp_stage, caplog): def test_show_csv(tmp_dir, scm, dvc, exp_stage, capsys): + import time + baseline_rev = scm.get_rev() def _get_rev_isotimestamp(rev): @@ -505,6 +507,7 @@ def test_show_csv(tmp_dir, scm, dvc, exp_stage, capsys): result1 = dvc.experiments.run(exp_stage.addressing, params=["foo=2"]) rev1 = first(result1) ref_info1 = first(exp_refs_by_rev(scm, rev1)) + time.sleep(1) result2 = dvc.experiments.run(exp_stage.addressing, params=["foo=3"]) rev2 = first(result2) ref_info2 = first(exp_refs_by_rev(scm, rev2))