You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/10/16 12:21:49 UTC

[3/3] ignite git commit: ignite-3478 Tests restructured

ignite-3478 Tests restructured


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

Branch: refs/heads/ignite-3478
Commit: b69f62eb6f293553502b9dd984b1fa6526a77401
Parents: 68cf84a
Author: sboikov <sb...@gridgain.com>
Authored: Mon Oct 16 15:21:27 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Oct 16 15:21:27 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/mvcc/CacheMvccAbstractTest.java        | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b69f62eb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
index 3954bff..f9ac96f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
@@ -714,8 +714,13 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
         List<TestCache> caches,
         ThreadLocalRandom rnd) {
         synchronized (caches) {
-            if (caches.size() == 1)
-                return caches.get(0);
+            if (caches.size() == 1) {
+                TestCache cache = caches.get(0);
+
+                assertTrue(cache.readLock());
+
+                return cache;
+            }
 
             for (;;) {
                 int idx = rnd.nextInt(caches.size());