Skip to content

Conversation

@vivekkoya
Copy link

@vivekkoya vivekkoya commented Oct 23, 2025

Please see: https://issues.apache.org/jira/browse/CASSANDRA-20984

Commit messages should follow the following format:

 java.lang.ClassCastException: Issues while joining



patch by Vivekanand Koya; reviewed by <Reviewers> for CASSANDRA-20984

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

@vivekkoya vivekkoya changed the title CASSANDRA-20984: java.lang.ClassCastException: Issues while joining CASSANDRA-20984: Fix java.lang.ClassCastException: Issues while joining Oct 24, 2025
public void testCompatibleVersion() throws InterruptedException, ExecutionException
{
Future<Result<Result.StreamingSuccess>> result = streamingConnect(new AcceptVersions(MessagingService.minimum_version, current_version + 1), new AcceptVersions(minimum_version + 2, current_version + 3));
if (result.isSuccess()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better if you did Assert.assertTrue(result.isSuccess()) so we can get rid of this if / else logic in each test method.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, makes sense.

SslFallbackConnectionType.SERVER_CONFIG
);
result.awaitUninterruptibly();
return result;
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we Assert.assertTrue(result.isSuccess()); return result.getNow() here? So you would just return Result from this method. It would be easier to work with later on.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it reduces duplicate code.

@vivekkoya
Copy link
Author

vivekkoya commented Oct 28, 2025

Incorporated changes here: vivekkoya@4e493dc
JDK 8 Compatible

@vivekkoya vivekkoya requested a review from smiklosovic October 28, 2025 04:00
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