jacek-lewandowski commented on code in PR #228:
URL: https://github.com/apache/cassandra-dtest/pull/228#discussion_r1269180991


##########
upgrade_tests/upgrade_through_versions_test.py:
##########
@@ -942,18 +947,20 @@ def create_upgrade_class(clsname, version_metas, 
protocol_version,
 for upgrade in MULTI_UPGRADES:
     # if any version_metas are None, this means they are versions not to be 
tested currently
     if all(upgrade.version_metas):
-        metas = upgrade.version_metas
+        # even for RUN_STATIC_UPGRADE_MATRIX we only test upgrade paths jdk 
compatible with the end "indev_" version
+        metas = jdk_compatible_steps(upgrade.version_metas)
 
         if not RUN_STATIC_UPGRADE_MATRIX:
-            if metas[-1].matches_current_env_version_family:
-                # looks like this test should actually run in the current env, 
so let's set the final version to match the env exactly
-                oldmeta = metas[-1]
-                newmeta = oldmeta.clone_with_local_env_version()
-                logger.debug("{} appears applicable to current env. Overriding 
final test version from {} to {}".format(upgrade.name, oldmeta.version, 
newmeta.version))
-                metas[-1] = newmeta
-                create_upgrade_class(upgrade.name, [m for m in metas], 
protocol_version=upgrade.protocol_version, extra_config=upgrade.extra_config)
-        else:
-            create_upgrade_class(upgrade.name, [m for m in metas], 
protocol_version=upgrade.protocol_version, extra_config=upgrade.extra_config)
+            # replace matching meta with current version
+            for idx, meta in enumerate(metas):
+                if meta.matches_current_env_version_family:
+                    java_version = current_env_java_version()

Review Comment:
   we should get that java version once and do not do that in every iteration 
in a loop



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to