shishkovilja commented on code in PR #11512:
URL: https://github.com/apache/ignite/pull/11512#discussion_r1826518213


##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithKeyContentionSelfTest.java:
##########
@@ -286,50 +205,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 {
-                    U.invoke(IgniteTxManager.class, srvTxMgr, 
"collectTxCollisionsInfo");
+                    U.invoke(IgniteTxManager.class, 
((IgniteEx)ig).context().cache().context().tm(),
+                            "collectTxCollisionsInfo");
                 }
                 catch (IgniteCheckedException e) {
                     fail(e.toString());
                 }
 
                 CacheMetrics metrics = 
ig.cache(DEFAULT_CACHE_NAME).localMetrics();
 
-                String coll1 = metrics.getTxKeyCollisions();
+                String coll = metrics.getTxKeyCollisions();
 
-                if (!coll1.isEmpty()) {
-                    String coll2 = metrics.getTxKeyCollisions();
-
-                    // check idempotent
-                    assertEquals(coll1, coll2);
-
-                    assertTrue(coll1.contains("queueSize"));
+                if (!coll.isEmpty()) {
+                    assertTrue(coll.contains("queueSize"));
 
                     return true;
                 }
-                else
-                    return false;
+                return false;

Review Comment:
   According to code style you should add empty line between return and other 
code in method.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to