java-driver icon indicating copy to clipboard operation
java-driver copied to clipboard

Fix CustomCcmRule to drop `CURRENT` flag no matter what

Open dkropachev opened this issue 1 year ago • 4 comments

It is follow up for https://github.com/apache/cassandra-java-driver/pull/1720

If super.after() throws an Exception CURRENT flag is never dropped which leads next tests with CustomCcmMRule to fail with IllegalStateException("Attempting to use a Ccm rule while another is in use. This is disallowed")

dkropachev avatar Sep 14 '24 10:09 dkropachev

@lukasz-antoniak , @tolbertam, could you please take a look at it

dkropachev avatar Sep 14 '24 10:09 dkropachev

Agree that the current behaviour is incorrect; an exception in super.after() shouldn't lead to subsequent failures. I've kicked off a Jenkins run to make sure there isn't any unexpected regression here (I'll be very surprised if there is) so once that's complete with issue this gets a +1 from me.

absurdfarce avatar Sep 18 '24 21:09 absurdfarce

Jenkins run looks good: one test failure but it's from a test that's known to fail intermittently.

absurdfarce avatar Sep 18 '24 23:09 absurdfarce

Thanks for the review and the testing @absurdfarce!

@dkropachev, if you could, can you amend your commit to include this in the last line and force push? Otherwise if you can give me access to the branch I can amend it as well:

Patch by Dmitry Kropachev; reviewed by Andy Tolbert and Bret McGuire for JAVA-3117

(Reusing JAVA-3117 as this was a follow on). After that I'll merge it, thanks!

tolbertam avatar Sep 19 '24 01:09 tolbertam

i'll go ahead and commit this today :+1:

tolbertam avatar Oct 28 '24 18:10 tolbertam

Committed as https://github.com/apache/cassandra-java-driver/commit/dfe11a8b671d76be6c4e90981a736325b0e4719b with the extra patch info, thank you!

tolbertam avatar Oct 29 '24 00:10 tolbertam