Skip to content

CNDB-17107 Use SCM HCD_1 as default for CC5 junit tests#2406

Merged
djatnieks merged 19 commits into
main-5.0from
CNDB-17107
May 12, 2026
Merged

CNDB-17107 Use SCM HCD_1 as default for CC5 junit tests#2406
djatnieks merged 19 commits into
main-5.0from
CNDB-17107

Conversation

@djatnieks
Copy link
Copy Markdown
Member

What is the issue

Fixes #17107

What does this PR fix and why was it fixed

Changes the default Storage Compatibility Mode (SCM) value used in unit tests from NONE to HCD_1 to ensure that by default we are testing with the compatibility mode we plan to deploy in Astra DB.

Since #17096 Jenkins builds have the ability to specify additional SCM modes, e.g. scm-none so that builds can cover any or multiple values. Note: the related #17756 updates the jenkins pipeline to use HCD_1 instead of CC_4.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Checklist before you submit for review

  • This PR adheres to the Definition of Done
  • Make sure there is a PR and ticket in the CNDB project updating the Converged Cassandra version
  • Use NoSpamLogger for log lines that may appear frequently in the logs
  • Verify test results on Butler
  • Test coverage for new/modified code is > 80%
  • Proper code formatting
  • Proper title for each commit staring with the project-issue number, like CNDB-1234
  • Each commit has a meaningful description
  • Each commit is not very long and contains related changes
  • Renames, moves and reformatting are in distinct commits
  • All new files should contain the DataStax copyright header instead of the Apache License one

@djatnieks djatnieks requested a review from driftx May 8, 2026 20:04
Comment thread src/java/org/apache/cassandra/auth/CIDRGroupsMappingManager.java Outdated
djatnieks added 19 commits May 12, 2026 08:52
Tests using CIDR permissions and identity-to-role mapping (5.0+ features)
were failing in compatibility mode because underlying tables don't exist.

Fixed by:
- Skipping test classes entirely dedicated to 5.0 features and individual
5.0 test methods in mixed test classes
- Adding guards in manager classes to prevent InvalidRequestException
  and NPE during test setup when tables/statements don't exist
…ndraRelevantProperties instead of DatabaseDescriptor to get the SCM
…n guards

Fixes the test framework (CQLTester) to conditionally initialize CIDR
components based on Storage Compatibility Mode, matching production
behavior in StorageService.doAuthSetup().
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
71.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@plpesvc-ds
Copy link
Copy Markdown

@djatnieks djatnieks merged commit 92475e8 into main-5.0 May 12, 2026
3 of 6 checks passed
@djatnieks djatnieks deleted the CNDB-17107 branch May 12, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants