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-4450 added test
Date Wed, 21 Dec 2016 12:09:16 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4450 4f76b75a0 -> e5e309f20


ignite-4450 added test


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

Branch: refs/heads/ignite-4450
Commit: e5e309f20474df0463ad7b761650c169e5c487ed
Parents: 4f76b75
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Dec 21 15:09:12 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Dec 21 15:09:12 2016 +0300

----------------------------------------------------------------------
 .../CacheLockReleaseNodeLeaveTest.java          | 34 ++++++++++++++++++++
 1 file changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e5e309f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
index f0f18c8..969b991 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLockReleaseNodeLeaveTest.java
@@ -212,6 +212,40 @@ public class CacheLockReleaseNodeLeaveTest extends GridCommonAbstractTest
{
     /**
      * @throws Exception If failed.
      */
+    public void testLockRelease3() throws Exception {
+        startGrid(0);
+
+        Ignite ignite1 = startGrid(1);
+
+        awaitPartitionMapExchange();
+
+        Lock lock = ignite1.cache(null).lock("key");
+        lock.lock();
+
+        IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Void>()
{
+            @Override public Void call() throws Exception {
+                startGrid(2);
+
+                return null;
+            }
+        });
+
+        assertFalse(fut.isDone());
+
+        ignite1.close();
+
+        fut.get(10_000);
+
+        Ignite ignite2 = ignite(2);
+
+        lock = ignite2.cache(null).lock("key");
+        lock.lock();
+        lock.unlock();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testTxLockRelease2() throws Exception {
         final Ignite ignite0 = startGrid(0);
 


Mime
View raw message