You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/07/01 11:54:21 UTC

[GitHub] [ignite] vmalin commented on a change in pull request #6646: IGNITE-11874 Fix mismatch between idle_verify results with and without -dump option.

vmalin commented on a change in pull request #6646: IGNITE-11874 Fix mismatch between idle_verify results with and without -dump option.
URL: https://github.com/apache/ignite/pull/6646#discussion_r299006966
 
 

 ##########
 File path: modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java
 ##########
 @@ -200,4 +209,48 @@ protected void addExtraArguments(List<String> args) {
     protected void injectTestSystemOut() {
         System.setOut(new PrintStream(testOut));
     }
+
+    /**
+     * Checks if all non-system txs and non-system mvcc futures are finished.
+     */
+    protected void checkUserFutures() {
+        for (Ignite ignite : G.allGrids()) {
+            IgniteEx ig = (IgniteEx)ignite;
+
+            final Collection<GridCacheFuture<?>> futs = ig.context().cache().context().mvcc().activeFutures();
+
+            boolean hasFutures = false;
+
+            for (GridCacheFuture<?> fut : futs) {
+                if (!fut.isDone()) {
+                    //skipping system tx futures if possible
+                    if (fut instanceof GridNearTxPrepareFutureAdapter
+                        && ((GridNearTxPrepareFutureAdapter) fut).tx().system())
+                        continue;
+
+                    if (fut instanceof GridDhtTxPrepareFuture
+                        && ((GridDhtTxPrepareFuture) fut).tx().system())
+                        continue;
+
+                    log.error("Expecting no active future [node=" + ig.localNode().id() + ", fut=" + fut + ']');
+
+                    hasFutures = true;
 
 Review comment:
   It is possible to move {fail} here and remove hasFutures varaible

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services