This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


The following commit(s) were added to refs/heads/trunk by this push:
     new c49bcf30 Skip upgrades in the 'since' fixture faster
c49bcf30 is described below

commit c49bcf307686886fb34eea646eb3e7ff5855eb03
Author: Brandon Williams <brandonwilli...@apache.org>
AuthorDate: Thu Mar 30 17:21:32 2023 -0500

    Skip upgrades in the 'since' fixture faster
    
    Patch by brandonwilliams; reviewed by adelapena for CASSANDRA-18391
---
 conftest.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/conftest.py b/conftest.py
index 5ba3de80..e07aeac6 100644
--- a/conftest.py
+++ b/conftest.py
@@ -439,6 +439,10 @@ def fixture_since(request, fixture_dtest_setup):
         # are excluded by the annotation
         if hasattr(request.cls, "UPGRADE_PATH"):
             upgrade_path = request.cls.UPGRADE_PATH
+            if hasattr(upgrade_path, 'upgrade_meta'):
+                skip_msg = 
_skip_msg(LooseVersion(upgrade_path.upgrade_meta.family), since, max_version)
+                if skip_msg:
+                    pytest.skip(skip_msg)
             ccm_repo_cache_dir, _ = 
ccmlib.repository.setup(upgrade_path.starting_meta.version)
             starting_version = get_version_from_build(ccm_repo_cache_dir)
             skip_msg = _skip_msg(starting_version, since, max_version)
@@ -486,6 +490,10 @@ def fixture_ported_to_in_jvm(request, fixture_dtest_setup):
         # are excluded by the annotation
         if hasattr(request.cls, "UPGRADE_PATH"):
             upgrade_path = request.cls.UPGRADE_PATH
+            if hasattr(upgrade_path, 'upgrade_meta'):
+                skip_msg = 
_skip_msg(LooseVersion(upgrade_path.upgrade_meta.family), since, max_version)
+                if skip_msg:
+                    pytest.skip(skip_msg)
             ccm_repo_cache_dir, _ = 
ccmlib.repository.setup(upgrade_path.starting_meta.version)
             starting_version = get_version_from_build(ccm_repo_cache_dir)
             skip_msg = _skip_ported_msg(starting_version, ported_from_version)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to