Skip to content

Commit 95f0c2a

Browse files
Copilotfruch
andcommitted
Fix Cassandra 5.0 compatibility: use JDK 11 and skip removed scripted UDF option
Cassandra 5.0 requires JDK 11+ (not 8) and removed scripted_user_defined_functions_enabled (replaced by WASM UDFs). Both caused the cluster to hang/fail during startup, resulting in ~15-minute timeouts per test module. Co-authored-by: fruch <340979+fruch@users.noreply.github.com>
1 parent ca027d6 commit 95f0c2a

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,16 @@ jobs:
104104
strategy:
105105
fail-fast: false
106106
matrix:
107-
java-version: [8]
108107
python-version: ["3.11"]
109108
event_loop_manager: ["libev", "asyncio"]
110109

111110
steps:
112111
- uses: actions/checkout@v6
113112

114-
- name: Set up JDK ${{ matrix.java-version }}
113+
- name: Set up JDK 11
115114
uses: actions/setup-java@v5
116115
with:
117-
java-version: ${{ matrix.java-version }}
116+
java-version: 11
118117
distribution: 'adopt'
119118

120119
- name: Install libev

tests/integration/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,13 +483,16 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
483483
CCM_CLUSTER = ccm_cluster_clz(path, cluster_name, **ccm_options)
484484
CCM_CLUSTER.set_configuration_options({'start_native_transport': True})
485485
if Version(cassandra_version) >= Version('4.1'):
486-
CCM_CLUSTER.set_configuration_options({
486+
options = {
487487
'user_defined_functions_enabled': True,
488-
'scripted_user_defined_functions_enabled': True,
489488
'materialized_views_enabled': True,
490489
'sasi_indexes_enabled': True,
491490
'transient_replication_enabled': True,
492-
})
491+
}
492+
# scripted (JavaScript) UDFs were removed in Cassandra 5.0 (replaced by WASM UDFs)
493+
if Version(cassandra_version) < Version('5.0'):
494+
options['scripted_user_defined_functions_enabled'] = True
495+
CCM_CLUSTER.set_configuration_options(options)
493496
elif Version(cassandra_version) >= Version('2.2'):
494497
CCM_CLUSTER.set_configuration_options({'enable_user_defined_functions': True})
495498
if Version(cassandra_version) >= Version('3.0'):

0 commit comments

Comments
 (0)