ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-4768-1
Date Tue, 14 Mar 2017 17:45:14 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4768-1 ceecfa3cc -> 4d2675c6b


ignite-4768-1


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4d2675c6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4d2675c6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4d2675c6

Branch: refs/heads/ignite-4768-1
Commit: 4d2675c6bd076a79a09856118e5d7737059eb909
Parents: ceecfa3
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Mar 14 20:45:03 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Mar 14 20:45:03 2017 +0300

----------------------------------------------------------------------
 .../TxOptimisticDeadlockDetectionTest.java      | 30 +++++++++++++-------
 1 file changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4d2675c6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
index 005e4a5..212675b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
@@ -25,6 +25,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.Callable;
 import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
@@ -111,9 +112,6 @@ public class TxOptimisticDeadlockDetectionTest extends GridCommonAbstractTest
{
 
         cfg.setClientMode(client);
 
-        // Test spi blocks message send, this can cause hang with striped pool.
-        cfg.setStripedPoolSize(-1);
-
         return cfg;
     }
 
@@ -555,15 +553,25 @@ public class TxOptimisticDeadlockDetectionTest extends GridCommonAbstractTest
{
 
                     GridCacheVersion txId = req.version();
 
-                    if (TX_IDS.contains(txId)) {
-                        while (TX_IDS.size() < TX_CNT) {
-                            try {
-                                U.sleep(50);
-                            }
-                            catch (IgniteInterruptedCheckedException e) {
-                                e.printStackTrace();
+                    if (TX_IDS.contains(txId) && TX_IDS.size() < TX_CNT) {
+                        GridTestUtils.runAsync(new Callable<Void>() {
+                            @Override public Void call() throws Exception {
+                                while (TX_IDS.size() < TX_CNT) {
+                                    try {
+                                        U.sleep(50);
+                                    }
+                                    catch (IgniteInterruptedCheckedException e) {
+                                        e.printStackTrace();
+                                    }
+                                }
+
+                                TestCommunicationSpi.super.sendMessage(node, msg, ackC);
+
+                                return null;
                             }
-                        }
+                        });
+
+                        return;
                     }
                 }
                 else if (msg0 instanceof GridNearTxPrepareResponse) {


Mime
View raw message