ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [13/14] ignite git commit: gg-12389
Date Mon, 03 Jul 2017 14:05:13 GMT
gg-12389


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

Branch: refs/heads/ignite-gg-12389
Commit: 96718eb98a001083ce2796d0f3524e191d868ec3
Parents: 79ad232
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Jul 3 15:04:27 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Jul 3 16:51:55 2017 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManager.java         |   3 +-
 .../processors/cache/GridCacheProcessor.java    |   7 +-
 .../GridDhtPartitionsExchangeFuture.java        |  31 ++--
 .../preloader/GridDhtPartitionsFullMessage.java |  44 +++---
 .../GridDhtPartitionsSingleMessage.java         |  38 ++---
 .../cluster/GridClusterStateProcessor.java      |  27 ++--
 .../IgniteDaemonNodeMarshallerCacheTest.java    |  10 --
 .../AbstractNodeJoinTemplate.java               |  22 ++-
 .../IgniteChangeGlobalStateAbstractTest.java    |   8 +-
 ...IgniteChangeGlobalStateDataStreamerTest.java |   5 +-
 .../IgniteChangeGlobalStateFailOverTest.java    |   6 +-
 .../IgniteChangeGlobalStateTest.java            | 150 ++++++++-----------
 .../IgniteStandByClusterTest.java               |  11 +-
 .../join/JoinActiveNodeToActiveCluster.java     |  62 +++-----
 ...ctiveNodeToActiveClusterWithPersistence.java |  17 +++
 .../junits/common/GridCommonAbstractTest.java   |   3 +
 16 files changed, 215 insertions(+), 229 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 07432bf..b38c1c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -701,7 +701,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
 
                     discoWrk.discoCache = discoCache;
 
-                    ctx.cache().context().exchange().onLocalJoin(discoEvt, discoCache);
+                    if (!isLocDaemon)
+                        ctx.cache().context().exchange().onLocalJoin(discoEvt, discoCache);
 
                     locJoin.onDone(new DiscoveryLocalJoinData(discoEvt,
                         discoCache,

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/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 21e36d4..8ff6a8d 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
@@ -825,6 +825,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override public void onKernalStart(boolean active) throws IgniteCheckedException {
+        if (ctx.isDaemon())
+            return;
+
         try {
             boolean checkConsistency =
                 !ctx.config().isDaemon() && !getBoolean(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK);
@@ -844,7 +847,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             cacheStartedLatch.countDown();
         }
 
-        if (!ctx.clientNode() && !ctx.isDaemon())
+        if (!ctx.clientNode())
             addRemovedItemsCleanupTask(Long.getLong(IGNITE_CACHE_REMOVED_ENTRIES_TTL, 10_000));
 
         // Escape if cluster inactive.
@@ -1974,7 +1977,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             sharedCtx.removeCacheContext(ctx);
 
-            onKernalStop(cache, destroy);
+            onKernalStop(cache, true);
 
             stopCache(cache, true, destroy);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index c7d2d19..a62176b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -1217,7 +1217,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
             m.partitionHistoryCounters(partHistReserved0);
 
         if (stateChangeExchange() && changeGlobalStateE != null)
-            m.setException(changeGlobalStateE);
+            m.setError(changeGlobalStateE);
 
         if (log.isDebugEnabled())
             log.debug("Sending local partitions [nodeId=" + node.id() + ", exchId=" + exchId + ", msg=" + m + ']');
@@ -1247,7 +1247,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
             compress);
 
         if (stateChangeExchange() && !F.isEmpty(changeGlobalStateExceptions))
-            m.setExceptionsMap(changeGlobalStateExceptions);
+            m.setErrorsMap(changeGlobalStateExceptions);
 
         return m;
     }
@@ -1261,9 +1261,10 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
         assert !nodes.contains(cctx.localNode());
 
-        if (log.isDebugEnabled())
+        if (log.isDebugEnabled()) {
             log.debug("Sending full partition map [nodeIds=" + F.viewReadOnly(nodes, F.node2id()) +
                 ", exchId=" + exchId + ", msg=" + m + ']');
+        }
 
         for (ClusterNode node : nodes) {
             try {
@@ -1378,7 +1379,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
             exchActions.completeRequestFutures(cctx);
 
         if (stateChangeExchange() && err == null)
-            cctx.kernalContext().state().onExchangeDone(false, exchActions.stateChangeRequest());
+            cctx.kernalContext().state().onStateChangeExchangeDone(exchActions.stateChangeRequest());
 
         Map<T2<Integer, Integer>, Long> localReserved = partHistSuppliers.getReservations(cctx.localNodeId());
 
@@ -1454,6 +1455,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
         crd = null;
         partReleaseFut = null;
         changeGlobalStateE = null;
+        exchActions = null;
     }
 
     /**
@@ -1530,8 +1532,8 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
                     pendingSingleUpdates++;
 
-                    if (stateChangeExchange() && msg.getException() != null)
-                        changeGlobalStateExceptions.put(node.id(), msg.getException());
+                    if (stateChangeExchange() && msg.getError() != null)
+                        changeGlobalStateExceptions.put(node.id(), msg.getError());
 
                     allReceived = remaining.isEmpty();
                 }
@@ -1872,12 +1874,19 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
                     assert req != null : exchActions;
 
-                    if (!F.isEmpty(changeGlobalStateExceptions))
+                    boolean stateChangeErr = false;
+
+                    if (!F.isEmpty(changeGlobalStateExceptions)) {
+                        stateChangeErr = true;
+
                         cctx.kernalContext().state().onStateChangeError(changeGlobalStateExceptions, req);
+                    }
+
+                    boolean active = !stateChangeErr && req.activate();
 
-                    // TODO GG-12389 (check result + case when sent full message but failed before custom message sent)
+                    // TODO GG-12389 (case when sent full message but failed before custom message sent)
                     ChangeGlobalStateFinishMessage msg = new ChangeGlobalStateFinishMessage(req.requestId(),
-                        req.activate());
+                        active);
 
                     cctx.discovery().sendCustomEvent(msg);
                 }
@@ -2015,8 +2024,8 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
         updatePartitionFullMap(msg);
 
-        if (stateChangeExchange() && !F.isEmpty(msg.getExceptionsMap()))
-            cctx.kernalContext().state().onStateChangeError(msg.getExceptionsMap(), exchActions.stateChangeRequest());
+        if (stateChangeExchange() && !F.isEmpty(msg.getErrorsMap()))
+            cctx.kernalContext().state().onStateChangeError(msg.getErrorsMap(), exchActions.stateChangeRequest());
 
         onDone(exchId.topologyVersion());
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
index 0beb935..75609b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
@@ -90,10 +90,10 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
     /** Exceptions. */
     @GridToStringInclude
     @GridDirectTransient
-    private Map<UUID, Exception> exs;
+    private Map<UUID, Exception> errs;
 
     /**  */
-    private byte[] exsBytes;
+    private byte[] errsBytes;
 
     /** */
     @GridDirectTransient
@@ -224,17 +224,17 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
     }
 
     /**
-     *
+     * @return Errors map.
      */
-    public Map<UUID, Exception> getExceptionsMap() {
-        return exs;
+    @Nullable Map<UUID, Exception> getErrorsMap() {
+        return errs;
     }
 
     /**
-     * @param exs Exs.
+     * @param errs Errors map.
      */
-    public void setExceptionsMap(Map<UUID, Exception> exs) {
-        this.exs = new HashMap<>(exs);
+    void setErrorsMap(Map<UUID, Exception> errs) {
+        this.errs = new HashMap<>(errs);
     }
 
     /** {@inheritDoc} */
@@ -245,14 +245,14 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
             (partCntrs != null && partCntrsBytes == null) ||
             (partHistSuppliers != null && partHistSuppliersBytes == null) ||
             (partsToReload != null && partsToReloadBytes == null) ||
-            (exs != null && exsBytes == null);
+            (errs != null && errsBytes == null);
 
         if (marshal) {
             byte[] partsBytes0 = null;
             byte[] partCntrsBytes0 = null;
             byte[] partHistSuppliersBytes0 = null;
             byte[] partsToReloadBytes0 = null;
-            byte[] exsBytes0 = null;
+            byte[] errsBytes0 = null;
 
             if (parts != null && partsBytes == null)
                 partsBytes0 = U.marshal(ctx, parts);
@@ -266,8 +266,8 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
             if (partsToReload != null && partsToReloadBytes == null)
                 partsToReloadBytes0 = U.marshal(ctx, partsToReload);
 
-            if (exs != null && exsBytes == null)
-                exsBytes0 = U.marshal(ctx, exs);
+            if (errs != null && errsBytes == null)
+                errsBytes0 = U.marshal(ctx, errs);
 
             if (compress) {
                 assert !compressed();
@@ -277,13 +277,13 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
                     byte[] partCntrsBytesZip = U.zip(partCntrsBytes0);
                     byte[] partHistSuppliersBytesZip = U.zip(partHistSuppliersBytes0);
                     byte[] partsToReloadBytesZip = U.zip(partsToReloadBytes0);
-                    byte[] exsBytesZip = U.zip(exsBytes0);
+                    byte[] exsBytesZip = U.zip(errsBytes0);
 
                     partsBytes0 = partsBytesZip;
                     partCntrsBytes0 = partCntrsBytesZip;
                     partHistSuppliersBytes0 = partHistSuppliersBytesZip;
                     partsToReloadBytes0 = partsToReloadBytesZip;
-                    exsBytes0 = exsBytesZip;
+                    errsBytes0 = exsBytesZip;
 
                     compressed(true);
                 }
@@ -296,7 +296,7 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
             partCntrsBytes = partCntrsBytes0;
             partHistSuppliersBytes = partHistSuppliersBytes0;
             partsToReloadBytes = partsToReloadBytes0;
-            exsBytes = exsBytes0;
+            errsBytes = errsBytes0;
         }
     }
 
@@ -379,15 +379,15 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
         if (partCntrs == null)
             partCntrs = new IgniteDhtPartitionCountersMap();
 
-        if (exsBytes != null && exs == null) {
+        if (errsBytes != null && errs == null) {
             if (compressed())
-                exs = U.unmarshalZip(ctx.marshaller(), exsBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
+                errs = U.unmarshalZip(ctx.marshaller(), errsBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
             else
-                exs = U.unmarshal(ctx, exsBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
+                errs = U.unmarshal(ctx, errsBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
-        if (exs == null)
-            exs = new HashMap<>();
+        if (errs == null)
+            errs = new HashMap<>();
     }
 
     /** {@inheritDoc} */
@@ -412,7 +412,7 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeByteArray("exsBytes", exsBytes))
+                if (!writer.writeByteArray("errsBytes", errsBytes))
                     return false;
 
                 writer.incrementState();
@@ -472,7 +472,7 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
                 reader.incrementState();
 
             case 6:
-                exsBytes = reader.readByteArray("exsBytes");
+                errsBytes = reader.readByteArray("errsBytes");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
index 1e5ea14..b4d25c4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java
@@ -76,10 +76,10 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
     /** Exception. */
     @GridToStringInclude
     @GridDirectTransient
-    private Exception ex;
+    private Exception err;
 
     /** */
-    private byte[] exBytes;
+    private byte[] errBytes;
 
     /** */
     private boolean client;
@@ -220,15 +220,15 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
     /**
      * @param ex Exception.
      */
-    public void setException(Exception ex) {
-        this.ex = ex;
+    public void setError(Exception ex) {
+        this.err = ex;
     }
 
     /**
-     *
+     * @return Not null exception if exchange processing failed.
      */
-    public Exception getException() {
-        return ex;
+    @Nullable public Exception getError() {
+        return err;
     }
 
     /** {@inheritDoc}
@@ -239,13 +239,13 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
         boolean marshal = (parts != null && partsBytes == null) ||
             (partCntrs != null && partCntrsBytes == null) ||
             (partHistCntrs != null && partHistCntrsBytes == null) ||
-            (ex != null && exBytes == null);
+            (err != null && errBytes == null);
 
         if (marshal) {
             byte[] partsBytes0 = null;
             byte[] partCntrsBytes0 = null;
             byte[] partHistCntrsBytes0 = null;
-            byte[] exBytes0 = null;
+            byte[] errBytes0 = null;
 
             if (parts != null && partsBytes == null)
                 partsBytes0 = U.marshal(ctx, parts);
@@ -256,8 +256,8 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
             if (partHistCntrs != null && partHistCntrsBytes == null)
                 partHistCntrsBytes0 = U.marshal(ctx, partHistCntrs);
 
-            if (ex != null && exBytes == null)
-                exBytes0 = U.marshal(ctx, ex);
+            if (err != null && errBytes == null)
+                errBytes0 = U.marshal(ctx, err);
 
             if (compress) {
                 assert !compressed();
@@ -266,12 +266,12 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
                     byte[] partsBytesZip = U.zip(partsBytes0);
                     byte[] partCntrsBytesZip = U.zip(partCntrsBytes0);
                     byte[] partHistCntrsBytesZip = U.zip(partHistCntrsBytes0);
-                    byte[] exBytesZip = U.zip(exBytes0);
+                    byte[] exBytesZip = U.zip(errBytes0);
 
                     partsBytes0 = partsBytesZip;
                     partCntrsBytes0 = partCntrsBytesZip;
                     partHistCntrsBytes0 = partHistCntrsBytesZip;
-                    exBytes0 = exBytesZip;
+                    errBytes0 = exBytesZip;
 
                     compressed(true);
                 }
@@ -283,7 +283,7 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
             partsBytes = partsBytes0;
             partCntrsBytes = partCntrsBytes0;
             partHistCntrsBytes = partHistCntrsBytes0;
-            exBytes = exBytes0;
+            errBytes = errBytes0;
         }
     }
 
@@ -312,11 +312,11 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
                 partHistCntrs = U.unmarshal(ctx, partHistCntrsBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
-        if (exBytes != null && ex == null) {
+        if (errBytes != null && err == null) {
             if (compressed())
-                ex = U.unmarshalZip(ctx.marshaller(), exBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
+                err = U.unmarshalZip(ctx.marshaller(), errBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
             else
-                ex = U.unmarshal(ctx, exBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
+                err = U.unmarshal(ctx, errBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
         }
 
         if (dupPartsData != null) {
@@ -368,7 +368,7 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
                 writer.incrementState();
 
             case 7:
-                if (!writer.writeByteArray("exBytes", exBytes))
+                if (!writer.writeByteArray("errBytes", errBytes))
                     return false;
 
                 writer.incrementState();
@@ -424,7 +424,7 @@ public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMes
                 reader.incrementState();
 
             case 7:
-                exBytes = reader.readByteArray("exBytes");
+                errBytes = reader.readByteArray("errBytes");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
index e6b36be..eb965b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
@@ -145,6 +145,7 @@ public class GridClusterStateProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * @param discoCache Discovery data cache.
      * @return If transition is in progress returns future which is completed when transition finishes.
      */
     @Nullable public IgniteInternalFuture<Boolean> onLocalJoin(DiscoCache discoCache) {
@@ -342,9 +343,8 @@ public class GridClusterStateProcessor extends GridProcessorAdapter {
     @Override public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data) {
         DiscoveryDataClusterState state = (DiscoveryDataClusterState)data.commonData();
 
-        assert state != null : data;
-
-        globalState = state;
+        if (state != null)
+            globalState = state;
     }
 
     /**
@@ -521,7 +521,7 @@ public class GridClusterStateProcessor extends GridProcessorAdapter {
     }
 
     /**
-     *
+     * @param req State change request.
      */
     private void onFinalActivate(final StateChangeRequest req) {
         ctx.closure().runLocalSafe(new Runnable() {
@@ -542,7 +542,7 @@ public class GridClusterStateProcessor extends GridProcessorAdapter {
                             + ctx.localNodeId() + ", client=" + client + ", topVer=" + req.topologyVersion() + "]");
                 }
                 catch (Exception ex) {
-                    e = ex;
+                    e = new IgniteCheckedException("Failed to perform final activation steps", ex);
 
                     U.error(log, "Failed to perform final activation steps [nodeId=" + ctx.localNodeId() +
                         ", client=" + client + ", topVer=" + req.topologyVersion() + "]", ex);
@@ -557,7 +557,7 @@ public class GridClusterStateProcessor extends GridProcessorAdapter {
     }
 
     /**
-     *
+     * @param req State change request.
      */
     private void onFinalDeActivate(final StateChangeRequest req) {
         globalState.setTransitionResult(req.requestId(), false);
@@ -566,16 +566,13 @@ public class GridClusterStateProcessor extends GridProcessorAdapter {
     }
 
     /**
-     *
+     * @param req State change request.
      */
-    public void onExchangeDone(boolean fail, StateChangeRequest req) {
-        // TODO GG-12389 pass correct fail flag.
-        if (!fail) {
-            if (req.activate())
-                onFinalActivate(req);
-            else
-                onFinalDeActivate(req);
-        }
+    public void onStateChangeExchangeDone(StateChangeRequest req) {
+        if (req.activate())
+            onFinalActivate(req);
+        else
+            onFinalDeActivate(req);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
index fdf5350..566860d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java
@@ -22,9 +22,6 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.lang.IgniteCallable;
 import org.apache.ignite.resources.IgniteInstanceResource;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
@@ -107,13 +104,6 @@ public class IgniteDaemonNodeMarshallerCacheTest extends GridCommonAbstractTest
 
         awaitPartitionMapExchange();
 
-        // Workaround for IGNITE-1365.
-        IgniteInternalFuture<?> fut = ((IgniteKernal) daemonNode).context().cache().context().exchange().
-            affinityReadyFuture(new AffinityTopologyVersion(2, 0));
-
-        if (fut != null)
-            fut.get();
-
         TestClass1 res1 = daemonNode.compute(daemonNode.cluster().forRemotes()).call(new TestCallable1());
 
         assertNotNull(res1);

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/AbstractNodeJoinTemplate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/AbstractNodeJoinTemplate.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/AbstractNodeJoinTemplate.java
index 9fa6f7c..ed0faef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/AbstractNodeJoinTemplate.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/AbstractNodeJoinTemplate.java
@@ -54,10 +54,13 @@ public abstract class AbstractNodeJoinTemplate extends GridCommonAbstractTest {
     protected static final String cache2 = "cache2";
 
     //Todo Cache with node filter.
+    /** */
     protected static final String cache3 = "cache3";
 
+    /** */
     protected static final String cache4 = "cache4";
 
+    /** */
     protected static final String cache5 = "cache5";
 
     /** Caches info. */
@@ -121,52 +124,61 @@ public abstract class AbstractNodeJoinTemplate extends GridCommonAbstractTest {
     public abstract JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationDifferentOnBothTemplate() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testJoinWithOutConfiguration() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testStaticCacheConfigurationOnJoin() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testStaticCacheConfigurationInCluster() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testStaticCacheConfigurationSameOnBoth() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testStaticCacheConfigurationDifferentOnBoth() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testJoinClientWithOutConfiguration() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testJoinClientStaticCacheConfigurationOnJoin() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testJoinClientStaticCacheConfigurationInCluster() throws Exception;
 
     /**
+     * @throws Exception If failed.
      *
      */
     public abstract void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception;
 
     /**
-     *
+     * @throws Exception If failed.
      */
     public abstract void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception;
 
@@ -309,6 +321,7 @@ public abstract class AbstractNodeJoinTemplate extends GridCommonAbstractTest {
         /** After de activate. */
         private Runnable afterDeActivate = Noop;
 
+        /** */
         private IgniteCallable<List<CacheConfiguration>> dynamicCacheStart =
             new IgniteCallable<List<CacheConfiguration>>() {
                 @Override public List<CacheConfiguration> call() throws Exception {
@@ -316,6 +329,7 @@ public abstract class AbstractNodeJoinTemplate extends GridCommonAbstractTest {
                 }
             };
 
+        /** */
         private IgniteCallable<List<String>> dynamicCacheStop =
             new IgniteCallable<List<String>>() {
                 @Override public List<String> call() throws Exception {
@@ -323,8 +337,10 @@ public abstract class AbstractNodeJoinTemplate extends GridCommonAbstractTest {
                 }
             };
 
+        /** */
         private Runnable afterDynamicCacheStarted = Noop;
 
+        /** */
         private Runnable afterDynamicCacheStopped = Noop;
 
         /** End. */
@@ -691,10 +707,6 @@ public abstract class AbstractNodeJoinTemplate extends GridCommonAbstractTest {
         public Runnable checkCacheEmpty() {
             return onAllNode(new IgniteInClosure<IgniteEx>() {
                 @Override public void apply(IgniteEx ig) {
-                    Map<String, DynamicCacheDescriptor> desc = cacheDescriptors(ig);
-
-                    Assert.assertTrue(desc.isEmpty());
-
                     Assert.assertNull(ig.context().cache().cache(cache1));
                     Assert.assertNull(ig.context().cache().cache(cache2));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
index a06e0ce..5371cdf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
@@ -330,11 +330,13 @@ public abstract class IgniteChangeGlobalStateAbstractTest extends GridCommonAbst
     @Override protected IgniteConfiguration getConfiguration(final String gridName) throws Exception {
         final IgniteConfiguration cfg = super.getConfiguration(gridName);
 
+        cfg.setConsistentId(gridName);
+
         PersistentStoreConfiguration pCfg = new PersistentStoreConfiguration();
 
-        pCfg.setPersistentStorePath(testName() + "/db");
-        pCfg.setWalArchivePath(testName() + "/db/wal/archive");
-        pCfg.setWalStorePath(testName() + "/db/wal");
+        pCfg.setPersistentStorePath(testName() + "/" + gridName + "/db");
+        pCfg.setWalArchivePath(testName() + "/" + gridName + "/db/wal/archive");
+        pCfg.setWalStorePath(testName() + "/" + gridName + "/db/wal");
 
         cfg.setPersistentStoreConfiguration(pCfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
index d3e8298..16be316 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
@@ -36,10 +36,9 @@ public class IgniteChangeGlobalStateDataStreamerTest extends IgniteChangeGlobalS
     }
 
     /**
-     *
+     * @throws Exception If failed.
      */
-    public void testDeActivateAndActivateDataStreamer() throws InterruptedException {
-
+    public void testDeActivateAndActivateDataStreamer() throws Exception {
         Ignite ig1 = primary(0);
         Ignite ig2 = primary(1);
         Ignite ig3 = primary(2);

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
index d0b2d56..f5a5ac0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
@@ -54,7 +54,7 @@ public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalState
     }
 
     /**
-     *
+     * @throws Exception If failed.
      */
     public void testActivateDeActivateOnFixTopology() throws Exception {
         final Ignite igB1 = backUp(0);
@@ -140,7 +140,7 @@ public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalState
     }
 
     /**
-     *
+     * @throws Exception If failed.
      */
     public void testActivateDeActivateOnJoiningNode() throws Exception {
         fail("https://issues.apache.org/jira/browse/IGNITE-5520");
@@ -252,7 +252,7 @@ public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalState
     }
 
     /**
-     *
+     * @throws Exception If failed.
      */
     public void testActivateDeActivateOnFixTopologyWithPutValues() throws Exception {
         final Ignite igB1 = backUp(0);

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
index 357c99d..9f033e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
@@ -128,80 +128,65 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract
 
         stopAllPrimary();
 
-        final AtomicInteger exCnt = new AtomicInteger();
-
         final CyclicBarrier barrier = new CyclicBarrier(backUpNodes() + backUpClientNodes());
 
         IgniteInternalFuture<Void> f1 = runAsync(new Callable<Void>() {
             @Override public Void call() throws Exception {
-                try {
-                    barrier.await();
-                    ig1B.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+                barrier.await();
+
+                ig1B.active(true);
+
                 return null;
             }
         });
 
-        IgniteInternalFuture<?> f2 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig2B.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+        IgniteInternalFuture<?> f2 = runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                barrier.await();
+
+                ig2B.active(true);
+
+                return null;
             }
         });
 
-        IgniteInternalFuture<?> f3 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig3B.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+        IgniteInternalFuture<?> f3 = runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                barrier.await();
+
+                ig3B.active(true);
+
+                return null;
             }
         });
 
-        IgniteInternalFuture<?> f4 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig1C.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+        IgniteInternalFuture<?> f4 = runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                barrier.await();
+
+                ig1C.active(true);
+
+                return null;
             }
         });
 
-        IgniteInternalFuture<?> f5 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig2C.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+        IgniteInternalFuture<?> f5 = runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                barrier.await();
+
+                ig2C.active(true);
+
+                return null;
             }
         });
 
-        IgniteInternalFuture<?> f6 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig3C.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+        IgniteInternalFuture<?> f6 = runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                barrier.await();
+
+                ig3C.active(true);
+
+                return null;
             }
         });
 
@@ -213,8 +198,6 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract
         f5.get();
         f6.get();
 
-        assertTrue(exCnt.get() > 0);
-
         assertTrue(ig1B.active());
         assertTrue(ig2B.active());
         assertTrue(ig3B.active());
@@ -238,43 +221,35 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract
 
         stopAllPrimary();
 
-        final AtomicInteger exCnt = new AtomicInteger();
-
         final CyclicBarrier barrier = new CyclicBarrier(3);
 
-        IgniteInternalFuture<?> act1 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig1B.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+        IgniteInternalFuture<?> act1 = runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                barrier.await();
+
+                ig1B.active(true);
+
+                return null;
             }
         });
 
-        IgniteInternalFuture<?> act2 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig2B.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+        IgniteInternalFuture<?> act2 = runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                barrier.await();
+
+                ig2B.active(true);
+
+                return null;
             }
         });
 
-        IgniteInternalFuture<?> act3 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig3B.active(true);
-                }
-                catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
+        IgniteInternalFuture<?> act3 = runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                barrier.await();
+
+                ig3B.active(true);
+
+                return null;
             }
         });
 
@@ -282,8 +257,6 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract
         act2.get();
         act3.get();
 
-        assertEquals(2, exCnt.get());
-
         assertTrue(ig1B.active());
         assertTrue(ig2B.active());
         assertTrue(ig3B.active());
@@ -419,6 +392,9 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract
         assertThrows(log, new Callable<Void>() {
             @Override public Void call() throws Exception {
                 IgniteCache cache = ig.cache("cache");
+
+                fail();
+
                 return null;
             }
         }, IgniteException.class, "Can not perform the operation because the cluster is inactive.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
index 130907f..2678e51 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
@@ -60,7 +60,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest {
     /**
      * @throws Exception if fail.
      */
-    public void testNotStartDynamicCachesOnClientAfterActivation() throws Exception {
+    public void testStartDynamicCachesAfterActivation() throws Exception {
         final String cacheName0 = "cache0";
         final String cacheName = "cache";
 
@@ -114,13 +114,10 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest {
         Map<String, GridCacheAdapter<?, ?>> caches = U.field(ig3.context().cache(), "caches");
 
         // Only system cache and cache0
-        assertEquals("Unexpected caches: " + caches.keySet(), 2, caches.size());
+        assertEquals("Unexpected caches: " + caches.keySet(), 3, caches.size());
         assertTrue(caches.containsKey(CU.UTILITY_CACHE_NAME));
         assertTrue(caches.containsKey(cacheName0));
-
-        assertNull(caches.get(cacheName));
-
-        assertNotNull(caches.get(cacheName0));
+        assertTrue(caches.containsKey(cacheName));
 
         assertNotNull(ig3.cache(cacheName));
     }
@@ -280,7 +277,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest {
         private final String name;
 
         /**
-         * @param name
+         * @param name Node name.
          */
         private NodeFilterIgnoreByName(String name) {
             this.name = name;

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java
index 9c5f017..8e90e78 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java
@@ -29,9 +29,7 @@ import org.junit.Assert;
  *
  */
 public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder withOutConfigurationTemplate() throws Exception {
         JoinNodeTestPlanBuilder b = builder();
 
@@ -56,9 +54,7 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
         return b;
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder staticCacheConfigurationOnJoinTemplate() throws Exception {
         JoinNodeTestPlanBuilder b = builder();
 
@@ -85,9 +81,7 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
         return b;
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder staticCacheConfigurationInClusterTemplate() throws Exception {
         JoinNodeTestPlanBuilder b = builder();
 
@@ -115,9 +109,7 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
         return b;
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder staticCacheConfigurationSameOnBothTemplate() throws Exception {
         JoinNodeTestPlanBuilder b = builder();
 
@@ -146,9 +138,7 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
         return b;
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder staticCacheConfigurationDifferentOnBothTemplate() throws Exception {
         JoinNodeTestPlanBuilder b = builder();
 
@@ -207,62 +197,46 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
         withOutConfigurationTemplate().execute();
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public void testStaticCacheConfigurationOnJoin() throws Exception {
         staticCacheConfigurationOnJoinTemplate().execute();
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public void testStaticCacheConfigurationInCluster() throws Exception {
         staticCacheConfigurationInClusterTemplate().execute();
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception {
         staticCacheConfigurationSameOnBothTemplate().execute();
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception {
         staticCacheConfigurationDifferentOnBothTemplate().execute();
     }
 
     // Client node join.
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public void testJoinClientWithOutConfiguration() throws Exception {
         joinClientWithOutConfigurationTemplate().execute();
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception {
         joinClientStaticCacheConfigurationOnJoinTemplate().execute();
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception {
         fail("https://issues.apache.org/jira/browse/IGNITE-5518");
 
         joinClientStaticCacheConfigurationInClusterTemplate().execute();
     }
 
-    /**
-     *
-     */
+    /** {@inheritDoc} */
     @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception {
         joinClientStaticCacheConfigurationSameOnBothTemplate().execute();
     }
@@ -276,14 +250,17 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
         joinClientStaticCacheConfigurationDifferentOnBothTemplate().execute();
     }
 
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder joinClientWithOutConfigurationTemplate() throws Exception {
         return withOutConfigurationTemplate().nodeConfiguration(setClient);
     }
 
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationOnJoinTemplate() throws Exception {
         return staticCacheConfigurationOnJoinTemplate().nodeConfiguration(setClient);
     }
 
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationInClusterTemplate() throws Exception {
         return staticCacheConfigurationInClusterTemplate()
             .nodeConfiguration(setClient)
@@ -360,8 +337,10 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
             });
     }
 
-    @Override
-    public JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationDifferentOnBothTemplate() throws Exception {
+    /** {@inheritDoc} */
+    @Override public JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationDifferentOnBothTemplate()
+        throws Exception
+    {
         return staticCacheConfigurationDifferentOnBothTemplate()
             .nodeConfiguration(setClient)
             .afterActivate(new Runnable() {
@@ -436,6 +415,7 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate {
             });
     }
 
+    /** {@inheritDoc} */
     @Override public JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationSameOnBothTemplate() throws Exception {
         return staticCacheConfigurationSameOnBothTemplate().nodeConfiguration(setClient);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
index 60388fa..1ccfb7d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
@@ -30,6 +30,10 @@ public class JoinActiveNodeToActiveClusterWithPersistence extends JoinActiveNode
         return persistentCfg(super.cfg(name));
     }
 
+    /**
+     * @param b Builder.
+     * @return Builder.
+     */
     private AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder persistent(AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder b) {
         b.afterClusterStarted(
             b.checkCacheEmpty()
@@ -44,6 +48,7 @@ public class JoinActiveNodeToActiveClusterWithPersistence extends JoinActiveNode
         return b;
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder withOutConfigurationTemplate() throws Exception {
         AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder b = persistent(super.withOutConfigurationTemplate());
 
@@ -52,6 +57,7 @@ public class JoinActiveNodeToActiveClusterWithPersistence extends JoinActiveNode
         return b;
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder joinClientWithOutConfigurationTemplate() throws Exception {
         AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder b = persistent(super.joinClientWithOutConfigurationTemplate());
 
@@ -60,46 +66,57 @@ public class JoinActiveNodeToActiveClusterWithPersistence extends JoinActiveNode
         return b;
     }
 
+    /** {@inheritDoc} */
     @Override public void testJoinWithOutConfiguration() throws Exception {
         withOutConfigurationTemplate().execute();
     }
 
+    /** {@inheritDoc} */
     @Override public void testJoinClientWithOutConfiguration() throws Exception {
         joinClientWithOutConfigurationTemplate().execute();
     }
 
+    /** {@inheritDoc} */
     @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception {
         staticCacheConfigurationDifferentOnBothTemplate().execute();
     }
 
+    /** {@inheritDoc} */
     @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception {
         staticCacheConfigurationInClusterTemplate().execute();
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder staticCacheConfigurationOnJoinTemplate() throws Exception {
         return persistent(super.staticCacheConfigurationOnJoinTemplate());
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder staticCacheConfigurationInClusterTemplate() throws Exception {
         return persistent(super.staticCacheConfigurationInClusterTemplate());
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder staticCacheConfigurationSameOnBothTemplate() throws Exception {
         return persistent(super.staticCacheConfigurationSameOnBothTemplate());
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder staticCacheConfigurationDifferentOnBothTemplate() throws Exception {
         return persistent(super.staticCacheConfigurationDifferentOnBothTemplate());
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationOnJoinTemplate() throws Exception {
         return persistent(super.joinClientStaticCacheConfigurationOnJoinTemplate());
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationInClusterTemplate() throws Exception {
         return persistent(super.joinClientStaticCacheConfigurationInClusterTemplate());
     }
 
+    /** {@inheritDoc} */
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder joinClientStaticCacheConfigurationDifferentOnBothTemplate() throws Exception {
         return persistent(super.joinClientStaticCacheConfigurationDifferentOnBothTemplate());
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/96718eb9/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 3f87c76..dc7e89d 100755
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -596,6 +596,9 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
             else
                 startTime = g0.context().discovery().gridStartTime();
 
+            if (g.cluster().localNode().isDaemon())
+                continue;
+
             IgniteInternalFuture<?> exchFut =
                 g0.context().cache().context().exchange().affinityReadyFuture(waitTopVer);
 


Mime
View raw message