jacek-lewandowski commented on code in PR #228:
URL: https://github.com/apache/cassandra-dtest/pull/228#discussion_r1269176065
##########
upgrade_tests/upgrade_through_versions_test.py:
##########
@@ -898,6 +887,22 @@ def create_upgrade_class(clsname, version_metas,
protocol_version,
return newcls
+def jdk_compatible_steps(version_metas):
+ metas = []
+ java_version = current_env_java_version()
+ for version_meta in version_metas:
+ if java_version in version_meta.java_versions:
+ metas.append(version_meta)
+
+ return metas
+
+
+def current_env_java_version():
+ java_command = os.path.join(os.environ['JAVA_HOME'], 'bin', 'java')
+ output = subprocess.check_output([java_command, '-version'],
stderr=subprocess.STDOUT).decode('utf-8')
Review Comment:
this is already implemented:
```
from ccmlib.common import get_jdk_version_int
return get_jdk_version_int(java_command)
```
--
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]