lhotari commented on code in PR #25104:
URL: https://github.com/apache/pulsar/pull/25104#discussion_r2642894545
##########
managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorTest.java:
##########
@@ -251,17 +252,36 @@ public void
testConcurrentPropertyOperationsThreadSafety() throws Exception {
}
break;
}
+ completedOperations.incrementAndGet();
+
} catch (ConcurrentModificationException cme) {
+ // Record ConcurrentModificationException but don't fail
immediately
Review Comment:
HashMap will throw ConcurrentModificationException only in specific methods
such as `forEach`, `compute`, and a few others.
I didn't run the tests without the fix to validate whether
ConcurrentModificationException would be thrown. Have you seen it if you revert
the fix and run the test?
I think that this catch block can be removed and just fail immediately like
it's done for other Exceptions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]