Repository navigation
ci: run integration tests against the latest Cassandra #1135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fruch
wants to merge
5
commits into
scylladb:master
Choose a base branch
from
fruch:cassandra-integration-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
186689d
tests: fix starting Cassandra 4.1+ and 5.0 clusters with CCM
fruch 663afa0
tests: make the standard integration tests pass on Cassandra
fruch 5de98da
tests: wait for the host to be up in test_reprepare_after_host_is_down
fruch 9ff3c90
tests: let test_connection_error wait for the restarted cluster
fruch c2c4e55
ci: run the integration tests against the latest Cassandra release
fruch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,6 +146,17 @@ def cmd_line_args_to_dict(env_var): | |
| CASSANDRA_VERSION = Version(mcv_string) if mcv_string else cassandra_version | ||
| CCM_VERSION = mcv_string if mcv_string else cv_string | ||
|
|
||
| if not SCYLLA_VERSION and CCMClusterFactory and CASSANDRA_VERSION.release[:2] >= (5, 0): | ||
| # scylla-ccm runs every Cassandra node with Java 8 (Node.get_env), but Cassandra 5.0 needs Java 11+. | ||
| # Use JAVA_HOME from the environment instead. Drop this once ccm picks the JDK by Cassandra version. | ||
| from ccmlib.node import Node as CCMNode | ||
|
|
||
| def _get_env_with_java_home(self): | ||
| update_conf = not self._Node__conf_updated | ||
| self._Node__conf_updated = True | ||
| return common.make_cassandra_env(self.get_install_dir(), self.get_path(), update_conf) | ||
| CCMNode.get_env = _get_env_with_java_home | ||
|
Comment on lines
+157
to
+158
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 High 1. Cassandra tests ignore configured java _get_env_with_java_home replaces scylla-ccm’s version-aware Node.get_env without passing hardcode_java_version, so CCM no longer selects Java 11 or honors CUSTOM_JAVA_HOME for Cassandra 5 nodes. When a test runner has no JAVA_HOME or relies on CCM’s documented custom-Java setting, its nodes can start with the wrong Java version and fail. Agent Prompt
|
||
|
|
||
| CASSANDRA_IP = os.getenv('CLUSTER_IP', '127.0.0.1') | ||
| CASSANDRA_DIR = os.getenv('CASSANDRA_DIR', None) | ||
|
|
||
|
|
@@ -309,6 +320,10 @@ def _has_vector_type(): | |
| _has_vector_type(), | ||
| 'Cassandra >= 5.0 or Scylla >= 2025.4 required') | ||
| xfail_scylla = lambda reason, *args, **kwargs: pytest.mark.xfail(SCYLLA_VERSION is not None, reason=reason, *args, **kwargs) | ||
| scylla_only = pytest.mark.skipif(SCYLLA_VERSION is None, reason='Scylla only test') | ||
| # system.local is read with a fixed column list since #528, without broadcast_port / rpc_port | ||
| xfail_cassandra_local_ports = pytest.mark.xfail(SCYLLA_VERSION is None and CASSANDRA_VERSION >= Version('4-a'), strict=True, | ||
| reason='broadcast_port / broadcast_rpc_port of the local host are not read') | ||
| incorrect_test = lambda reason='This test seems to be incorrect and should be fixed', *args, **kwargs: pytest.mark.xfail(reason=reason, *args, **kwargs) | ||
|
|
||
| pypy = unittest.skipUnless(platform.python_implementation() == "PyPy", "Test is skipped unless it's on PyPy") | ||
|
|
@@ -1028,5 +1043,6 @@ def _get_config_val(self, k, v): | |
| return v | ||
|
|
||
| def set_configuration_options(self, values=None, *args, **kwargs): | ||
| new_values = {self._get_config_key(k, str(v)):self._get_config_val(k, str(v)) for (k,v) in values.items()} | ||
| # keep v's type: str(True) is written as the YAML string 'True', which Cassandra refuses to start with | ||
| new_values = {self._get_config_key(k, v): self._get_config_val(k, v) for (k, v) in values.items()} | ||
| super(Cassandra41CCMCluster, self).set_configuration_options(values=new_values, *args, **kwargs) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.