chesnokoff commented on code in PR #13136:
URL: https://github.com/apache/ignite/pull/13136#discussion_r3309512235


##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java:
##########
@@ -68,6 +74,9 @@ public class TxDeadlockDetectionNoHangsTest extends 
GridCommonAbstractTest {
 
         cfg.setCacheConfiguration(ccfg);
 
+        listeningLog.registerListener(lsnr);

Review Comment:
   Theoretically, we still have a small race:
   ```
   assertFalse(DEAD_LOCK_LSNR.check());
   // catch the log
   listeningLog.registerListener(DEAD_LOCK_LSNR);
   ```
   
   Probably it would be better to use
   ```
   public void registerListener(@NotNull Consumer<String> lsnr)
   ```
   and make smth like
   ```
   registerListener(log -> <update atomicBoolean if catch the log>)
   ```
   so the atomicBoolean would be a common state for all grids
   
   
   But on the other hand it makes the test more complicated. WDYT?



-- 
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]

Reply via email to