ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [10/50] [abbrv] incubator-ignite git commit: sp-2 fixing tests
Date Tue, 10 Mar 2015 07:37:23 GMT
sp-2 fixing tests


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

Branch: refs/heads/ignite-329
Commit: d4eb97ce43e0d99ed272b838ca1bcfd55708e1f1
Parents: d47470c
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Fri Mar 6 15:23:38 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Fri Mar 6 15:23:38 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheProcessor.java    | 10 +++--
 ...gniteProjectionStartStopRestartSelfTest.java | 42 ++++++++++++--------
 2 files changed, 32 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4eb97ce/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index e76c922..20ad5e1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1727,9 +1727,13 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param ldr Class loader.
      */
     public void onUndeployed(ClassLoader ldr) {
-        if (!ctx.isStopping())
-            for (GridCacheAdapter<?, ?> cache : caches.values())
-                cache.onUndeploy(ldr);
+        if (!ctx.isStopping()) {
+            for (GridCacheAdapter<?, ?> cache : caches.values()) {
+                // Do not notify system caches.
+                if (!cache.context().system() && !CU.isAtomicsCache(cache.context().name()))
+                    cache.onUndeploy(ldr);
+            }
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4eb97ce/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
index d4c5fc5..d6d87f9 100644
--- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
+++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
@@ -119,9 +119,12 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
         G.setDaemon(true);
 
-        ignite = G.start(CFG_NO_ATTR);
-
-        G.setDaemon(false);
+        try {
+            ignite = G.start(CFG_NO_ATTR);
+        }
+        finally {
+            G.setDaemon(false);
+        }
 
         ignite.events().localListen(new IgnitePredicate<Event>() {
             @Override public boolean apply(Event evt) {
@@ -132,7 +135,8 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
                     if (joinedLatch != null)
                         joinedLatch.countDown();
-                } else if (evt.type() == EVT_NODE_LEFT) {
+                }
+                else if (evt.type() == EVT_NODE_LEFT) {
                     leftCnt.incrementAndGet();
 
                     if (leftLatch != null)
@@ -146,25 +150,29 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        if (!ignite.cluster().nodes().isEmpty()) {
-            leftLatch = new CountDownLatch(ignite.cluster().nodes().size());
+        try {
+            if (!ignite.cluster().nodes().isEmpty()) {
+                leftLatch = new CountDownLatch(ignite.cluster().nodes().size());
 
-            ignite.cluster().stopNodes();
+                ignite.cluster().stopNodes();
 
-            assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
-        }
-
-        boolean wasEmpty = ignite.cluster().nodes().isEmpty();
+                assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+            }
 
-        G.stop(true);
+            boolean wasEmpty = ignite.cluster().nodes().isEmpty();
 
-        joinedCnt.set(0);
-        leftCnt.set(0);
+            joinedCnt.set(0);
+            leftCnt.set(0);
 
-        joinedLatch = null;
-        leftLatch = null;
+            joinedLatch = null;
+            leftLatch = null;
 
-        assert wasEmpty : "grid.isEmpty() returned false after all nodes were stopped [nodes="
+ ignite.cluster().nodes() + ']';
+            assert wasEmpty : "grid.isEmpty() returned false after all nodes were stopped"
+
+                "[nodes=" + ignite.cluster().nodes() + ']';
+        }
+        finally {
+            G.stop(true);
+        }
     }
 
     /** {@inheritDoc} */


Mime
View raw message