shishkovilja commented on code in PR #11512:
URL: https://github.com/apache/ignite/pull/11512#discussion_r1826575164
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithKeyContentionSelfTest.java:
##########
@@ -286,50 +236,31 @@ private void
runKeyCollisionsMetric(TransactionConcurrency concurrency, Transact
finishFut.markInitialized();
- for (Ignite ig0 : G.allGrids()) {
- TestRecordingCommunicationSpi commSpi0 =
-
(TestRecordingCommunicationSpi)ig0.configuration().getCommunicationSpi();
-
- if (ig0.configuration().isClientMode())
- continue;
-
- commSpi0.stopBlock();
- }
-
- IgniteTxManager srvTxMgr =
((IgniteEx)ig).context().cache().context().tm();
-
assertTrue(GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
try {
Review Comment:
This try catch is actually useless, because exception is propagated to main
thread. I suggest to surround entire `assert(waitForCondition)` expression with
try-finally statement, with futures finishing in finally block.
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithKeyContentionSelfTest.java:
##########
@@ -286,50 +236,31 @@ private void
runKeyCollisionsMetric(TransactionConcurrency concurrency, Transact
finishFut.markInitialized();
- for (Ignite ig0 : G.allGrids()) {
- TestRecordingCommunicationSpi commSpi0 =
-
(TestRecordingCommunicationSpi)ig0.configuration().getCommunicationSpi();
-
- if (ig0.configuration().isClientMode())
- continue;
-
- commSpi0.stopBlock();
- }
-
- IgniteTxManager srvTxMgr =
((IgniteEx)ig).context().cache().context().tm();
-
assertTrue(GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
try {
Review Comment:
This try catch is actually useless, because exception is propagated to main
thread. I suggest to surround entire `assert(waitForCondition ...)` expression
with try-finally statement, with futures finishing in finally block.
--
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]