Skip to content

CASSANDRA-20766: Improve Interval B-Tree test coverage; add pprinter for B-Trees#4251

Closed
ifesdjeen wants to merge 1 commit intoapache:trunkfrom
ifesdjeen:b-tree-debug
Closed

CASSANDRA-20766: Improve Interval B-Tree test coverage; add pprinter for B-Trees#4251
ifesdjeen wants to merge 1 commit intoapache:trunkfrom
ifesdjeen:b-tree-debug

Conversation

@ifesdjeen
Copy link
Copy Markdown
Contributor

Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20766.

Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20766.
@ifesdjeen ifesdjeen requested a review from belliottsmith July 15, 2025 08:05
private static TestInterval newInterval(RandomSource random, int keyDomain, int valueDomain)
{
int end = 1 + random.nextInt(keyDomain - 1);
int end = 1 + random.nextInt(Math.max(1, keyDomain - 1));
Copy link
Copy Markdown
Contributor

@belliottsmith belliottsmith Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe end = keyDomain == 1 ? 1 : 1 + random.nextInt(Math.max(1, keyDomain - 1)) ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on commit

@ifesdjeen ifesdjeen closed this Jul 16, 2025
@ifesdjeen ifesdjeen changed the title Improve Interval B-Tree test coverage; add pprinter for B-Trees CASSANDRA-20766: Improve Interval B-Tree test coverage; add pprinter for B-Trees Jul 16, 2025
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.

2 participants