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 2015/06/11 14:54:05 UTC

[1/2] incubator-ignite git commit: ignite-sprint-6: merge from ignite-471-2

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-sprint-6 8020594e6 -> 37c56f697


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java
index ccf01c6..930b5d1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSslSelfTest.java
@@ -35,6 +35,8 @@ public class GridNioSslSelfTest extends GridNioSelfTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
         sslCtx = GridTestUtils.sslContext();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java
index c33014b..de6cd85 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/tostring/GridToStringBuilderSelfTest.java
@@ -70,11 +70,11 @@ public class GridToStringBuilderSelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * TODO: IGNITE-602.
-     *
      * @throws Exception If failed.
      */
     public void testToStringCheckAdvancedRecursionPrevention() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-602");
+
         ArrayList<Object> list1 = new ArrayList<>();
         ArrayList<Object> list2 = new ArrayList<>();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
index 095a404..4164fda 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.marshaller;
 
+import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.jsr166.*;
 
@@ -27,11 +28,15 @@ import java.util.concurrent.*;
  */
 public class MarshallerContextTestImpl extends MarshallerContextAdapter {
     /** */
-    private final ConcurrentMap<Integer, String> map = new ConcurrentHashMap8<>();
+    private final static ConcurrentMap<Integer, String> map = new ConcurrentHashMap8<>();
 
     /** {@inheritDoc} */
-    @Override protected boolean registerClassName(int id, String clsName) {
-        map.putIfAbsent(id, clsName);
+    @Override protected boolean registerClassName(int id, String clsName) throws IgniteCheckedException {
+        String oldClsName = map.putIfAbsent(id, clsName);
+
+        if (oldClsName != null && !oldClsName.equals(clsName))
+            throw new IgniteCheckedException("Duplicate ID [id=" + id + ", oldClsName=" + oldClsName + ", clsName=" +
+                clsName + ']');
 
         return true;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
index b7838be..455bc8c 100644
--- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
@@ -24,7 +24,6 @@ import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -185,8 +184,6 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest implements Ser
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        ((OptimizedMarshaller)cfg.getMarshaller()).setRequireSerializable(false);
-
         TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
 
         discoSpi.setIpFinder(ipFinder);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java
index c71ccbb..6b3ad63 100644
--- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PContinuousDeploymentSelfTest.java
@@ -98,6 +98,8 @@ public class GridP2PContinuousDeploymentSelfTest extends GridCommonAbstractTest
      */
     @SuppressWarnings("unchecked")
     public void testDeployment() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-934");
+
         Ignite ignite = startGrid(GRID_NAME);
 
         Class cls = getExternalClassLoader().loadClass(TEST_TASK_1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java
index 28eb687..51a7574 100644
--- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PLocalDeploymentSelfTest.java
@@ -212,7 +212,7 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest {
 
             for (ClusterNode node : subgrid) {
                 if (node.id().equals(arg))
-                    return Collections.singletonMap(new TestJob(arg), node);
+                    return Collections.singletonMap(new DeployementTestJob(arg), node);
             }
 
             throw new IgniteException("Failed to find target node: " + arg);
@@ -230,7 +230,7 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest {
         /**
          * Simple job class.
          */
-        public static class TestJob extends ComputeJobAdapter {
+        public static class DeployementTestJob extends ComputeJobAdapter {
             /** Ignite instance. */
             @IgniteInstanceResource
             private Ignite ignite;
@@ -238,7 +238,7 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest {
             /**
              * @param nodeId Node ID for node this job is supposed to execute on.
              */
-            public TestJob(UUID nodeId) { super(nodeId); }
+            public DeployementTestJob(UUID nodeId) { super(nodeId); }
 
             /** {@inheritDoc} */
             @Override public Serializable execute() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java
index a6e3411..e62141e 100644
--- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PRemoteClassLoadersSelfTest.java
@@ -43,9 +43,9 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
 
         // Override P2P configuration to exclude Task and Job classes
         cfg.setPeerClassLoadingLocalClassPathExclude(
-            GridP2PTestTask.class.getName(),
-            GridP2PTestTask1.class.getName(),
-            GridP2PTestJob.class.getName(),
+            GridP2PRemoteTestTask.class.getName(),
+            GridP2PRemoteTestTask1.class.getName(),
+            GridP2PRemoteTestJob.class.getName(),
             GridP2PRemoteClassLoadersSelfTest.class.getName()
         );
 
@@ -73,13 +73,14 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
             ClassLoader tstClsLdr =
                 new GridTestClassLoader(
                     Collections.<String, String>emptyMap(), getClass().getClassLoader(),
-                    GridP2PTestTask.class.getName(), GridP2PTestTask1.class.getName(), GridP2PTestJob.class.getName());
+                    GridP2PRemoteTestTask.class.getName(), GridP2PRemoteTestTask1.class.getName(),
+                    GridP2PRemoteTestJob.class.getName());
 
             Class<? extends ComputeTask<?, ?>> task1 =
-                (Class<? extends ComputeTask<?, ?>>) tstClsLdr.loadClass(GridP2PTestTask.class.getName());
+                (Class<? extends ComputeTask<?, ?>>) tstClsLdr.loadClass(GridP2PRemoteTestTask.class.getName());
 
             Class<? extends ComputeTask<?, ?>> task2 =
-                (Class<? extends ComputeTask<?, ?>>) tstClsLdr.loadClass(GridP2PTestTask1.class.getName());
+                (Class<? extends ComputeTask<?, ?>>) tstClsLdr.loadClass(GridP2PRemoteTestTask1.class.getName());
 
             Object res1 = ignite1.compute().execute(task1.newInstance(), null);
 
@@ -124,19 +125,19 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
             ClassLoader tstClsLdr1 =
                 new GridTestClassLoader(
                     Collections.EMPTY_MAP, getClass().getClassLoader(),
-                    GridP2PTestTask.class.getName(), GridP2PTestJob.class.getName()
+                    GridP2PRemoteTestTask.class.getName(), GridP2PRemoteTestJob.class.getName()
                 );
 
             ClassLoader tstClsLdr2 =
                 new GridTestClassLoader(
                     Collections.EMPTY_MAP, getClass().getClassLoader(),
-                    GridP2PTestTask1.class.getName(), GridP2PTestJob.class.getName());
+                    GridP2PRemoteTestTask1.class.getName(), GridP2PRemoteTestJob.class.getName());
 
             Class<? extends ComputeTask<?, ?>> task1 =
-                (Class<? extends ComputeTask<?, ?>>) tstClsLdr1.loadClass(GridP2PTestTask.class.getName());
+                (Class<? extends ComputeTask<?, ?>>) tstClsLdr1.loadClass(GridP2PRemoteTestTask.class.getName());
 
             Class<? extends ComputeTask<?, ?>> task2 =
-                (Class<? extends ComputeTask<?, ?>>) tstClsLdr2.loadClass(GridP2PTestTask1.class.getName());
+                (Class<? extends ComputeTask<?, ?>>) tstClsLdr2.loadClass(GridP2PRemoteTestTask1.class.getName());
 
             Object res1 = ignite1.compute().execute(task1.newInstance(), null);
 
@@ -217,11 +218,11 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
     /**
      * P2P test job.
      */
-    public static class GridP2PTestJob extends ComputeJobAdapter {
+    public static class GridP2PRemoteTestJob extends ComputeJobAdapter {
         /**
          * @param arg Argument.
          */
-        public GridP2PTestJob(String arg) {
+        public GridP2PRemoteTestJob(String arg) {
             super(arg);
         }
 
@@ -235,7 +236,7 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
     /**
      * P2P test task.
      */
-    public static class GridP2PTestTask extends ComputeTaskAdapter<Serializable, Object> {
+    public static class GridP2PRemoteTestTask extends ComputeTaskAdapter<Serializable, Object> {
         /** */
         @LoggerResource
         private IgniteLogger log;
@@ -250,7 +251,7 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
 
             for (ClusterNode node : subgrid) {
                 if (!node.id().equals(ignite.configuration().getNodeId()))
-                    map.put(new GridP2PTestJob(null) , node);
+                    map.put(new GridP2PRemoteTestJob(null) , node);
             }
 
             return map;
@@ -275,7 +276,7 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest {
     /**
      * P2p test task.
      */
-    public static class GridP2PTestTask1 extends GridP2PTestTask {
+    public static class GridP2PRemoteTestTask1 extends GridP2PRemoteTestTask {
         // No-op.
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java
index 744635d..9e18c70 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.nio.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.communication.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.internal.*;
@@ -32,7 +31,6 @@ import org.apache.ignite.testframework.junits.common.*;
 
 import java.net.*;
 import java.util.*;
-import java.util.concurrent.*;
 
 /**
  * Test for {@link org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi} and {@link org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi}.
@@ -99,7 +97,6 @@ public class GridTcpSpiForwardingSelfTest extends GridCommonAbstractTest {
         cfg.setDiscoverySpi(spi);
         cfg.setLocalHost("127.0.0.1");
         cfg.setConnectorConfiguration(null);
-        cfg.setMarshaller(new OptimizedMarshaller(false));
 
         TcpCommunicationSpi commSpi = new TcpCommunicationSpi() {
             @Override protected GridCommunicationClient createTcpClient(ClusterNode node) throws IgniteCheckedException {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
index 1a85eae..d03d327 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
@@ -1510,4 +1510,18 @@ public final class GridTestUtils {
         else
             return cls.getSimpleName();
     }
+
+    /**
+     * Adds test to the suite only if it's not in {@code ignoredTests} set.
+     *
+     * @param suite TestSuite where to place the test.
+     * @param test Test.
+     * @param ignoredTests Tests to ignore.
+     */
+    public static void addTestIfNeeded(TestSuite suite, Class test, Set<Class> ignoredTests) {
+        if (ignoredTests != null && ignoredTests.contains(test))
+            return;
+
+        suite.addTestSuite(test);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java b/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
index 5fa78ed..9345618 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
@@ -64,6 +64,9 @@ public final class GridTestProperties {
     private static final Map<String, Map<String, String>> pathProps = new HashMap<>();
 
     /** */
+    public static final String MARSH_CLASS_NAME = "marshaller.class";
+
+    /** */
     static {
         // Initialize IGNITE_HOME system property.
         String igniteHome = System.getProperty("IGNITE_HOME");
@@ -159,6 +162,14 @@ public final class GridTestProperties {
     }
 
     /**
+     * @param name Property name.
+     * @param val Property value.
+     */
+    public static synchronized void setProperty(String name, String val) {
+        getProperties().put(name, val);
+    }
+
+    /**
      * @param dir Directory path.
      * @return Properties.
      */
@@ -175,9 +186,6 @@ public final class GridTestProperties {
             // potentially overriding defaults.
             loadProperties(props, dir);
 
-            // Seal it.
-            props = Collections.unmodifiableMap(props);
-
             pathProps.put(dir, props);
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java
index 61dddbe..68ae64b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java
@@ -193,6 +193,7 @@ public class IgniteTestResources {
     }
 
     /**
+     * @param cls Class.
      * @return Logger for specified class.
      */
     public static IgniteLogger getLogger(Class<?> cls) {
@@ -226,17 +227,17 @@ public class IgniteTestResources {
      */
     @SuppressWarnings("unchecked")
     public synchronized Marshaller getMarshaller() throws IgniteCheckedException {
-        String marshallerName = GridTestProperties.getProperty("marshaller.class");
+        String marshallerName = GridTestProperties.getProperty(GridTestProperties.MARSH_CLASS_NAME);
 
-        Marshaller marshaller;
+        Marshaller marsh;
 
         if (marshallerName == null)
-            marshaller = new OptimizedMarshaller();
+            marsh = new OptimizedMarshaller();
         else {
             try {
                 Class<? extends Marshaller> cls = (Class<? extends Marshaller>)Class.forName(marshallerName);
 
-                marshaller = cls.newInstance();
+                marsh = cls.newInstance();
             }
             catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
                 throw new IgniteCheckedException("Failed to create test marshaller [marshaller=" +
@@ -244,8 +245,11 @@ public class IgniteTestResources {
             }
         }
 
-        marshaller.setContext(new MarshallerContextTestImpl());
+        if (marsh instanceof OptimizedMarshaller)
+            ((OptimizedMarshaller)marsh).setRequireSerializable(false);
 
-        return marshaller;
+        marsh.setContext(new MarshallerContextTestImpl());
+
+        return marsh;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index cc3abb4..b4977ce 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -29,6 +29,9 @@ import org.apache.ignite.internal.product.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.messaging.*;
 import org.apache.ignite.spi.*;
+import org.apache.ignite.testframework.*;
+
+import java.util.*;
 
 /**
  * Basic test suite.
@@ -39,28 +42,38 @@ public class IgniteBasicTestSuite extends TestSuite {
      * @throws Exception Thrown in case of the failure.
      */
     public static TestSuite suite() throws Exception {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests Tests don't include in the execution.
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
         TestSuite suite = new TestSuite("Ignite Basic Test Suite");
 
         suite.addTest(IgniteLangSelfTestSuite.suite());
-        suite.addTest(IgniteUtilSelfTestSuite.suite());
-        suite.addTest(IgniteMarshallerSelfTestSuite.suite());
-        suite.addTest(IgniteKernalSelfTestSuite.suite());
+        suite.addTest(IgniteUtilSelfTestSuite.suite(ignoredTests));
+        suite.addTest(IgniteMarshallerSelfTestSuite.suite(ignoredTests));
+
+        suite.addTest(IgniteKernalSelfTestSuite.suite(ignoredTests));
         suite.addTest(IgniteStartUpTestSuite.suite());
         suite.addTest(IgniteExternalizableSelfTestSuite.suite());
         suite.addTest(IgniteP2PSelfTestSuite.suite());
-        suite.addTest(IgniteCacheP2pUnmarshallingErrorTestSuite.suite());
+        suite.addTest(IgniteCacheP2pUnmarshallingErrorTestSuite.suite(ignoredTests));
         suite.addTest(IgniteStreamSelfTestSuite.suite());
 
         suite.addTest(new TestSuite(GridSelfTest.class));
-        suite.addTest(new TestSuite(GridProjectionSelfTest.class));
-        suite.addTest(new TestSuite(GridMessagingSelfTest.class));
+        GridTestUtils.addTestIfNeeded(suite, GridProjectionSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridMessagingSelfTest.class, ignoredTests);
         suite.addTest(new TestSuite(IgniteMessagingWithClientTest.class));
-        suite.addTest(new TestSuite(GridMessagingNoPeerClassLoadingSelfTest.class));
+        GridTestUtils.addTestIfNeeded(suite, GridMessagingNoPeerClassLoadingSelfTest.class, ignoredTests);
 
         if (U.isLinux() || U.isMacOs())
             suite.addTest(IgniteIpcSharedMemorySelfTestSuite.suite());
 
-        suite.addTestSuite(GridReleaseTypeSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, GridReleaseTypeSelfTest.class, ignoredTests);
         suite.addTestSuite(GridProductVersionSelfTest.class);
         suite.addTestSuite(GridAffinityProcessorRendezvousSelfTest.class);
         suite.addTestSuite(GridClosureProcessorSelfTest.class);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
index c71da11..08178db 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
@@ -24,6 +24,9 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.*;
 import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.*;
+import org.apache.ignite.testframework.*;
+
+import java.util.*;
 
 /**
  * Test suite.
@@ -34,12 +37,21 @@ public class IgniteCacheFailoverTestSuite extends TestSuite {
      * @throws Exception Thrown in case of the failure.
      */
     public static TestSuite suite() throws Exception {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests Tests don't include in the execution.
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
         TestSuite suite = new TestSuite("Cache Failover Test Suite");
 
         suite.addTestSuite(GridCacheAtomicInvalidPartitionHandlingSelfTest.class);
         suite.addTestSuite(GridCacheAtomicClientInvalidPartitionHandlingSelfTest.class);
 
-        suite.addTestSuite(GridCacheIncrementTransformTest.class);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheIncrementTransformTest.class, ignoredTests);
 
         // Failure consistency tests.
         suite.addTestSuite(GridCacheAtomicRemoveFailureTest.class);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java
index f54f85a..7cfefd1 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheP2pUnmarshallingErrorTestSuite.java
@@ -19,6 +19,9 @@ package org.apache.ignite.testsuites;
 
 import junit.framework.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.testframework.*;
+
+import java.util.*;
 
 /**
  * Checks behavior on exception while unmarshalling key.
@@ -29,12 +32,21 @@ public class IgniteCacheP2pUnmarshallingErrorTestSuite extends TestSuite {
      * @throws Exception If failed.
      */
     public static TestSuite suite() throws Exception {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests Tests don't include in the execution.
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
         TestSuite suite = new TestSuite("P2p Unmarshalling Test Suite");
 
-        suite.addTestSuite(IgniteCacheP2pUnmarshallingErrorTest.class);
-        suite.addTestSuite(IgniteCacheP2pUnmarshallingNearErrorTest.class);
-        suite.addTestSuite(IgniteCacheP2pUnmarshallingRebalanceErrorTest.class);
-        suite.addTestSuite(IgniteCacheP2pUnmarshallingTxErrorTest.class);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingErrorTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingNearErrorTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingRebalanceErrorTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2pUnmarshallingTxErrorTest.class, ignoredTests);
 
         return suite;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index 5f37aea..6245308 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -32,6 +32,9 @@ import org.apache.ignite.internal.processors.cache.distributed.near.*;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.*;
 import org.apache.ignite.internal.processors.cache.local.*;
 import org.apache.ignite.internal.processors.datastreamer.*;
+import org.apache.ignite.testframework.*;
+
+import java.util.*;
 
 /**
  * Test suite.
@@ -42,6 +45,15 @@ public class IgniteCacheTestSuite extends TestSuite {
      * @throws Exception Thrown in case of the failure.
      */
     public static TestSuite suite() throws Exception {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
         TestSuite suite = new TestSuite("IgniteCache Test Suite");
 
         suite.addTestSuite(IgniteCacheEntryListenerAtomicTest.class);
@@ -97,8 +109,8 @@ public class IgniteCacheTestSuite extends TestSuite {
         // Common tests.
         suite.addTestSuite(GridCacheConcurrentMapSelfTest.class);
         suite.addTestSuite(GridCacheAffinityMapperSelfTest.class);
-        suite.addTestSuite(GridCacheAffinityRoutingSelfTest.class);
-        suite.addTestSuite(GridCacheMvccSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheAffinityRoutingSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheMvccSelfTest.class, ignoredTests);
         suite.addTestSuite(GridCacheMvccPartitionedSelfTest.class);
         suite.addTestSuite(GridCacheMvccManagerSelfTest.class);
 //        suite.addTestSuite(GridCacheP2PUndeploySelfTest.class); TODO uncomment in DR branch.
@@ -111,11 +123,11 @@ public class IgniteCacheTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheBalancingStoreSelfTest.class);
         suite.addTestSuite(GridCacheAffinityApiSelfTest.class);
         suite.addTestSuite(GridCacheStoreValueBytesSelfTest.class);
-        suite.addTestSuite(DataStreamProcessorSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, DataStreamProcessorSelfTest.class, ignoredTests);
         suite.addTestSuite(DataStreamerMultiThreadedSelfTest.class);
         suite.addTestSuite(DataStreamerMultinodeCreateCacheTest.class);
         suite.addTestSuite(DataStreamerImplSelfTest.class);
-        suite.addTestSuite(GridCacheEntryMemorySizeSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheEntryMemorySizeSelfTest.class, ignoredTests);
         suite.addTestSuite(GridCacheClearAllSelfTest.class);
         suite.addTestSuite(GridCacheObjectToStringSelfTest.class);
         suite.addTestSuite(GridCacheLoadOnlyStoreAdapterSelfTest.class);
@@ -140,10 +152,10 @@ public class IgniteCacheTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheMixedPartitionExchangeSelfTest.class);
         suite.addTestSuite(IgniteCacheAtomicMessageRecoveryTest.class);
         // suite.addTestSuite(IgniteCacheTxMessageRecoveryTest.class); TODO IGNITE-795
-        suite.addTestSuite(GridCacheOffHeapTieredEvictionAtomicSelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredEvictionSelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredAtomicSelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredEvictionAtomicSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredEvictionSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredAtomicSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredSelfTest.class, ignoredTests);
         suite.addTestSuite(GridCacheGlobalLoadTest.class);
         suite.addTestSuite(GridCachePartitionedLocalStoreSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedLocalStoreSelfTest.class);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
index f0080d5..978941d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
@@ -29,6 +29,9 @@ import org.apache.ignite.internal.processors.port.*;
 import org.apache.ignite.internal.processors.service.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.spi.communication.*;
+import org.apache.ignite.testframework.*;
+
+import java.util.*;
 
 /**
  * Kernal self test suite.
@@ -39,6 +42,15 @@ public class IgniteKernalSelfTestSuite extends TestSuite {
      * @throws Exception If failed.
      */
     public static TestSuite suite() throws Exception {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests Tests don't include in the execution.
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
         TestSuite suite = new TestSuite("Ignite Kernal Test Suite");
 
         suite.addTestSuite(GridSameVmStartupSelfTest.class);
@@ -63,7 +75,7 @@ public class IgniteKernalSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridDiscoveryEventSelfTest.class);
         suite.addTestSuite(GridPortProcessorSelfTest.class);
         suite.addTestSuite(GridHomePathSelfTest.class);
-        suite.addTestSuite(GridStartupWithSpecifiedWorkDirectorySelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, GridStartupWithSpecifiedWorkDirectorySelfTest.class, ignoredTests);
         suite.addTestSuite(GridStartupWithUndefinedIgniteHomeSelfTest.class);
         suite.addTestSuite(GridVersionSelfTest.class);
         suite.addTestSuite(GridListenActorSelfTest.class);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java
index 10afe10..40c32a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java
@@ -21,6 +21,9 @@ import junit.framework.*;
 import org.apache.ignite.internal.util.io.*;
 import org.apache.ignite.marshaller.jdk.*;
 import org.apache.ignite.marshaller.optimized.*;
+import org.apache.ignite.testframework.*;
+
+import java.util.*;
 
 /**
  * Test suite for all marshallers.
@@ -31,16 +34,25 @@ public class IgniteMarshallerSelfTestSuite extends TestSuite {
      * @throws Exception If failed.
      */
     public static TestSuite suite() throws Exception {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
         TestSuite suite = new TestSuite("Ignite Marshaller Test Suite");
 
-        suite.addTest(new TestSuite(GridJdkMarshallerSelfTest.class));
-        suite.addTest(new TestSuite(OptimizedMarshallerEnumSelfTest.class));
-        suite.addTest(new TestSuite(OptimizedMarshallerSelfTest.class));
-        suite.addTest(new TestSuite(OptimizedMarshallerTest.class));
-        suite.addTest(new TestSuite(OptimizedObjectStreamSelfTest.class));
-        suite.addTest(new TestSuite(GridUnsafeDataOutputArraySizingSelfTest.class));
-        suite.addTest(new TestSuite(OptimizedMarshallerNodeFailoverTest.class));
-        suite.addTest(new TestSuite(OptimizedMarshallerSerialPersistentFieldsSelfTest.class));
+        GridTestUtils.addTestIfNeeded(suite, GridJdkMarshallerSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerEnumSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, OptimizedObjectStreamSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridUnsafeDataOutputArraySizingSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerNodeFailoverTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, OptimizedMarshallerSerialPersistentFieldsSelfTest.class, ignoredTests);
 
         return suite;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
index 1c75a7f..64ff6ee 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
@@ -26,10 +26,13 @@ import org.apache.ignite.internal.util.offheap.unsafe.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.*;
+import org.apache.ignite.testframework.*;
 import org.apache.ignite.thread.*;
 import org.apache.ignite.util.*;
 import org.apache.ignite.util.mbeans.*;
 
+import java.util.*;
+
 /**
  * Test suite for Ignite utility classes.
  */
@@ -39,10 +42,19 @@ public class IgniteUtilSelfTestSuite extends TestSuite {
      * @throws Exception If failed.
      */
     public static TestSuite suite() throws Exception {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests Tests don't include in the execution.
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
         TestSuite suite = new TestSuite("Ignite Util Test Suite");
 
         suite.addTestSuite(GridThreadPoolExecutorServiceSelfTest.class);
-        suite.addTestSuite(IgniteUtilsSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, IgniteUtilsSelfTest.class, ignoredTests);
         suite.addTestSuite(GridSpinReadWriteLockSelfTest.class);
         suite.addTestSuite(GridQueueSelfTest.class);
         suite.addTestSuite(GridStringBuilderFactorySelfTest.class);
@@ -64,9 +76,9 @@ public class IgniteUtilSelfTestSuite extends TestSuite {
 
         // NIO.
         suite.addTestSuite(GridNioSessionMetaKeySelfTest.class);
-        suite.addTestSuite(GridNioSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, GridNioSelfTest.class, ignoredTests);
         suite.addTestSuite(GridNioFilterChainSelfTest.class);
-        suite.addTestSuite(GridNioSslSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, GridNioSslSelfTest.class, ignoredTests);
         suite.addTestSuite(GridNioDelimitedBufferSelfTest.class);
 
         return suite;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath1.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath1.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath1.java
index c997358..2ae54aa 100644
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath1.java
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath1.java
@@ -64,11 +64,11 @@ public class P2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, Integer
             sleep = false;
         }
 
-        Map<TestJob, ClusterNode> jobs = U.newHashMap(subgrid.size());
+        Map<TestJob1, ClusterNode> jobs = U.newHashMap(subgrid.size());
 
         for (ClusterNode node : subgrid) {
             if (nodeIds.contains(node.id()))
-                jobs.put(new TestJob(node.id(), sleep), node);
+                jobs.put(new TestJob1(node.id(), sleep), node);
         }
 
         if (!jobs.isEmpty())
@@ -88,7 +88,7 @@ public class P2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, Integer
      * Simple job class
      */
     @SuppressWarnings({"PublicInnerClass"})
-    public static class TestJob extends ComputeJobAdapter {
+    public static class TestJob1 extends ComputeJobAdapter {
         /** Task session. */
         @TaskSessionResource
         private ComputeTaskSession ses;
@@ -107,7 +107,7 @@ public class P2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, Integer
         /**
          *
          */
-        public TestJob() {
+        public TestJob1() {
             // No-op.
         }
 
@@ -115,7 +115,7 @@ public class P2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, Integer
          * @param nodeId Node ID for node this job is supposed to execute on.
          * @param sleep Sleep flag.
          */
-        public TestJob(UUID nodeId, boolean sleep) {
+        public TestJob1(UUID nodeId, boolean sleep) {
             super(nodeId);
 
             this.sleep = sleep;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath2.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath2.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath2.java
index 6c7565b..01f3991 100644
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath2.java
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/P2PTestTaskExternalPath2.java
@@ -64,11 +64,11 @@ public class P2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, Integer
             sleep = false;
         }
 
-        Map<TestJob, ClusterNode> jobs = U.newHashMap(subgrid.size());
+        Map<TestJob2, ClusterNode> jobs = U.newHashMap(subgrid.size());
 
         for (ClusterNode node : subgrid) {
             if (nodeIds.contains(node.id()))
-                jobs.put(new TestJob(node.id(), sleep), node);
+                jobs.put(new TestJob2(node.id(), sleep), node);
         }
 
         if (!jobs.isEmpty())
@@ -88,7 +88,7 @@ public class P2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, Integer
      * Simple job class
      */
     @SuppressWarnings("PublicInnerClass")
-    public static class TestJob extends ComputeJobAdapter {
+    public static class TestJob2 extends ComputeJobAdapter {
         /** Ignite instance. */
         @IgniteInstanceResource
         private Ignite ignite;
@@ -108,7 +108,7 @@ public class P2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, Integer
          * @param nodeId Node ID for node this job is supposed to execute on.
          * @param sleep Sleep flag.
          */
-        public TestJob(UUID nodeId, boolean sleep) {
+        public TestJob2(UUID nodeId, boolean sleep) {
             super(nodeId);
 
             this.sleep = sleep;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index 7aab5e8..e2175f6 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -93,4 +93,20 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
index 40c40a5..29220f3 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
@@ -58,8 +58,6 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
 
         c.setDiscoverySpi(disco);
 
-        c.setMarshaller(new OptimizedMarshaller(false));
-
         c.setCacheConfiguration(createCache("replicated", CacheMode.REPLICATED),
             createCache("partitioned", CacheMode.PARTITIONED));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
index 2d6855e..c29027c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -98,7 +98,6 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
 
         cfg.setCacheConfiguration(cacheCfg);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
         cfg.setDeploymentMode(SHARED);
 
         if (excluded)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
index 7d06fe6..c3290a6 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
@@ -21,7 +21,6 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.marshaller.optimized.*;
 
 import java.util.*;
 import java.util.concurrent.*;
@@ -51,15 +50,6 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
     }
 
     /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration c = super.getConfiguration(gridName);
-
-        c.setMarshaller(new OptimizedMarshaller(false));
-
-        return c;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception {
         CacheConfiguration cfg = super.cacheConfiguration(gridName);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
index b859ba9..4555c6b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -99,8 +98,6 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
             cfg.setPeerClassLoadingLocalClassPathExclude(GridCacheSwapSelfTest.class.getName(),
                 CacheValue.class.getName());
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
index 3159589..ccb3115 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.processors.datastructures.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.processors.query.h2.sql.*;
 import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -74,8 +73,6 @@ public abstract class IgniteCacheAbstractFieldsQuerySelfTest extends GridCommonA
 
         cfg.setPeerClassLoadingEnabled(false);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         if (hasCache)
             cfg.setCacheConfiguration(cache(null, true), cache(CACHE, true), cache(EMPTY_CACHE, true),
                 cache(CACHE_NO_PRIMITIVES, false), cache(CACHE_COMPLEX_KEYS, false));
@@ -217,11 +214,11 @@ public abstract class IgniteCacheAbstractFieldsQuerySelfTest extends GridCommonA
 
             assert metas != null;
 
-            assertEquals("Invalid meta: " + metas, 5, metas.size());
-
             boolean wasNull = false;
             boolean wasNamed = false;
             boolean wasEmpty = false;
+            boolean wasNoPrimitives = false;
+            boolean wasComplexKeys = false;
 
             for (GridCacheSqlMetadata meta : metas) {
                 if (meta.cacheName() == null) {
@@ -288,11 +285,17 @@ public abstract class IgniteCacheAbstractFieldsQuerySelfTest extends GridCommonA
 
                     wasEmpty = true;
                 }
+                else if (CACHE_NO_PRIMITIVES.equals(meta.cacheName()))
+                    wasNoPrimitives = true;
+                else if (CACHE_COMPLEX_KEYS.equals(meta.cacheName()))
+                    wasComplexKeys = true;
             }
 
             assert wasNull;
             assert wasNamed;
             assert wasEmpty;
+            assert wasNoPrimitives;
+            assert wasComplexKeys;
         }
         finally {
             ((IgniteKernal)grid(0)).getCache(null).remove(new GridCacheInternalKeyImpl("LONG"));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
index 0d45711..f0ee81f 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
@@ -108,8 +108,6 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
         // Otherwise noop swap space will be chosen on Windows.
         c.setSwapSpaceSpi(new FileSwapSpaceSpi());
 
-        c.setMarshaller(new OptimizedMarshaller(false));
-
         if (!gridName.startsWith("client")) {
             CacheConfiguration[] ccs = new CacheConfiguration[2];
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java
index c0e1b21..024163e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePartitionedQueryMultiThreadedSelfTest.java
@@ -78,7 +78,7 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
         cc.setRebalanceMode(CacheRebalanceMode.SYNC);
         cc.setAtomicityMode(TRANSACTIONAL);
         cc.setIndexedTypes(
-            UUID.class, Person.class
+            UUID.class, PersonObj.class
         );
 
         c.setCacheConfiguration(cc);
@@ -126,12 +126,12 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
         long duration = 10 * 1000;
         final int logMod = 100;
 
-        final Person p1 = new Person("Jon", 1500, "Master");
-        final Person p2 = new Person("Jane", 2000, "Master");
-        final Person p3 = new Person("Mike", 1800, "Bachelor");
-        final Person p4 = new Person("Bob", 1900, "Bachelor");
+        final PersonObj p1 = new PersonObj("Jon", 1500, "Master");
+        final PersonObj p2 = new PersonObj("Jane", 2000, "Master");
+        final PersonObj p3 = new PersonObj("Mike", 1800, "Bachelor");
+        final PersonObj p4 = new PersonObj("Bob", 1900, "Bachelor");
 
-        final IgniteCache<UUID, Person> cache0 = grid(0).cache(null);
+        final IgniteCache<UUID, PersonObj> cache0 = grid(0).cache(null);
 
         cache0.put(p1.id(), p1);
         cache0.put(p2.id(), p2);
@@ -150,10 +150,10 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
         IgniteInternalFuture<?> futLucene = GridTestUtils.runMultiThreadedAsync(new CAX() {
             @Override public void applyx() throws IgniteCheckedException {
                 while (!done.get()) {
-                    QueryCursor<Cache.Entry<UUID, Person>> master =
-                        cache0.query(new TextQuery(Person.class, "Master"));
+                    QueryCursor<Cache.Entry<UUID, PersonObj>> master =
+                        cache0.query(new TextQuery(PersonObj.class, "Master"));
 
-                    Collection<Cache.Entry<UUID, Person>> entries = master.getAll();
+                    Collection<Cache.Entry<UUID, PersonObj>> entries = master.getAll();
 
                     checkResult(entries, p1, p2);
 
@@ -171,10 +171,10 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
         IgniteInternalFuture<?> futSql = GridTestUtils.runMultiThreadedAsync(new CAX() {
             @Override public void applyx() throws IgniteCheckedException {
                 while (!done.get()) {
-                    QueryCursor<Cache.Entry<UUID, Person>> bachelors =
-                            cache0.query(new SqlQuery(Person.class, "degree = 'Bachelor'"));
+                    QueryCursor<Cache.Entry<UUID, PersonObj>> bachelors =
+                            cache0.query(new SqlQuery(PersonObj.class, "degree = 'Bachelor'"));
 
-                    Collection<Cache.Entry<UUID, Person>> entries = bachelors.getAll();
+                    Collection<Cache.Entry<UUID, PersonObj>> entries = bachelors.getAll();
 
                     checkResult(entries, p3, p4);
 
@@ -198,8 +198,8 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
      * @param entries Queried result.
      * @param persons Persons that should be in the result.
      */
-    private void checkResult(Iterable<Cache.Entry<UUID, Person>> entries, Person... persons) {
-        for (Cache.Entry<UUID, Person> entry : entries) {
+    private void checkResult(Iterable<Cache.Entry<UUID, PersonObj>> entries, PersonObj... persons) {
+        for (Cache.Entry<UUID, PersonObj> entry : entries) {
             assertEquals(entry.getKey(), entry.getValue().id());
 
             assert F.asList(persons).contains(entry.getValue());
@@ -207,7 +207,7 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
     }
 
     /** Test class. */
-    private static class Person implements Externalizable {
+    private static class PersonObj implements Externalizable {
         /** */
         @GridToStringExclude
         private UUID id = UUID.randomUUID();
@@ -226,7 +226,7 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
         private String degree;
 
         /** Required by {@link Externalizable}. */
-        public Person() {
+        public PersonObj() {
             // No-op.
         }
 
@@ -235,7 +235,7 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
          * @param salary Salary.
          * @param degree Degree.
          */
-        Person(String name, int salary, String degree) {
+        PersonObj(String name, int salary, String degree) {
             assert name != null;
             assert salary > 0;
             assert degree != null;
@@ -291,17 +291,17 @@ public class IgniteCachePartitionedQueryMultiThreadedSelfTest extends GridCommon
             if (obj == this)
                 return true;
 
-            if (!(obj instanceof Person))
+            if (!(obj instanceof PersonObj))
                 return false;
 
-            Person that = (Person)obj;
+            PersonObj that = (PersonObj)obj;
 
             return that.id.equals(id) && that.name.equals(name) && that.salary == salary && that.degree.equals(degree);
         }
 
         /** {@inheritDoc} */
         @Override public String toString() {
-            return S.toString(Person.class, this);
+            return S.toString(PersonObj.class, this);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
index 1d6bbc8..9fcd947 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
@@ -84,7 +84,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         cfg.setDiscoverySpi(disco);
 
         cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
-        cfg.setMarshaller(new OptimizedMarshaller(false));
 
         cfg.setCacheConfiguration(cacheConfiguration());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
index 34e86ff..8ab2485 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
@@ -62,7 +62,6 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends GridCom
             cfg.setCacheConfiguration();
 
         cfg.setDiscoverySpi(discovery());
-        cfg.setMarshaller(new OptimizedMarshaller(false));
 
         return cfg;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index e8b3c61..c4d2481 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -25,7 +25,6 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.processors.query.h2.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -62,8 +61,6 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
 
         c.setDiscoverySpi(disco);
 
-        c.setMarshaller(new OptimizedMarshaller(true));
-
         // Cache.
         CacheConfiguration cc = defaultCacheConfiguration();
 
@@ -92,7 +89,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
     }
 
     /**
-     *
+     * @throws Exception If failed.
      */
     public void testAllExamples() throws Exception {
         checkQuery("select ? limit ? offset ?");


[2/2] incubator-ignite git commit: ignite-sprint-6: merge from ignite-471-2

Posted by sb...@apache.org.
ignite-sprint-6: merge from ignite-471-2


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

Branch: refs/heads/ignite-sprint-6
Commit: 37c56f69749e994090e1df192b12617e795699f5
Parents: 8020594
Author: Denis Magda <dm...@gridgain.com>
Authored: Thu Jun 11 15:48:14 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Thu Jun 11 15:48:14 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/GridPluginContext.java      |  6 ++
 .../internal/MarshallerContextAdapter.java      | 30 ++++++-
 .../ignite/internal/MarshallerContextImpl.java  | 10 +--
 .../internal/interop/InteropIgnition.java       |  2 +
 .../processors/cache/GridCacheMessage.java      | 51 -----------
 .../processors/cache/GridCacheProcessor.java    | 10 +--
 .../cacheobject/IgniteCacheObjectProcessor.java |  9 +-
 .../IgniteCacheObjectProcessorImpl.java         | 12 ++-
 .../datastreamer/DataStreamerImpl.java          |  8 +-
 .../portable/GridPortableInputStream.java       | 10 +++
 .../processors/query/GridQueryProcessor.java    |  2 +-
 .../ignite/internal/util/IgniteUtils.java       |  3 +
 .../internal/visor/VisorMultiNodeTask.java      |  2 +-
 .../ignite/marshaller/MarshallerContext.java    |  8 ++
 .../org/apache/ignite/plugin/PluginContext.java |  6 ++
 modules/core/src/test/config/tests.properties   |  2 +-
 .../internal/GridDiscoveryEventSelfTest.java    |  6 +-
 ...ridFailFastNodeFailureDetectionSelfTest.java |  2 +
 .../GridFailoverTaskWithPredicateSelfTest.java  |  3 -
 .../GridJobMasterLeaveAwareSelfTest.java        |  2 -
 .../internal/GridJobStealingSelfTest.java       |  3 -
 ...ectionLocalJobMultipleArgumentsSelfTest.java |  2 -
 .../GridTaskExecutionContextSelfTest.java       |  9 --
 .../IgniteComputeEmptyClusterGroupTest.java     |  3 -
 .../IgniteComputeTopologyExceptionTest.java     |  9 --
 .../GridDiscoveryManagerAliveCacheSelfTest.java |  5 ++
 .../cache/GridCacheAbstractSelfTest.java        |  3 -
 .../cache/GridCacheAffinityRoutingSelfTest.java |  4 +-
 .../cache/GridCacheDeploymentSelfTest.java      |  3 -
 .../cache/GridCacheEntryMemorySizeSelfTest.java | 91 +++++++++++---------
 .../cache/GridCacheMemoryModeSelfTest.java      |  2 -
 .../GridCacheReferenceCleanupSelfTest.java      |  3 -
 .../cache/IgniteCacheAbstractTest.java          |  3 -
 .../IgniteCacheEntryListenerAbstractTest.java   | 14 +--
 ...cheAtomicReferenceMultiNodeAbstractTest.java | 11 ---
 ...GridCacheQueueMultiNodeAbstractSelfTest.java |  2 -
 ...CacheQueueRotativeMultiNodeAbstractTest.java | 10 ---
 .../GridCacheSetAbstractSelfTest.java           |  9 --
 .../GridCacheAbstractJobExecutionTest.java      |  3 -
 .../GridCachePreloadLifecycleAbstractTest.java  |  2 -
 ...heAbstractTransformWriteThroughSelfTest.java |  3 -
 .../near/GridCacheNearEvictionSelfTest.java     |  3 -
 ...idCachePartitionedHitsAndMissesSelfTest.java |  3 -
 .../GridCacheSwapScanQueryAbstractSelfTest.java |  3 -
 ...ridCacheContinuousQueryAbstractSelfTest.java |  2 -
 .../closure/GridClosureProcessorSelfTest.java   | 29 +++----
 .../continuous/GridEventConsumeSelfTest.java    |  2 -
 .../DataStreamProcessorSelfTest.java            | 44 ++++++----
 .../internal/util/nio/GridNioSelfTest.java      | 13 ++-
 .../internal/util/nio/GridNioSslSelfTest.java   |  2 +
 .../tostring/GridToStringBuilderSelfTest.java   |  4 +-
 .../marshaller/MarshallerContextTestImpl.java   | 11 ++-
 .../ignite/messaging/GridMessagingSelfTest.java |  3 -
 .../GridP2PContinuousDeploymentSelfTest.java    |  2 +
 .../p2p/GridP2PLocalDeploymentSelfTest.java     |  6 +-
 .../p2p/GridP2PRemoteClassLoadersSelfTest.java  | 31 +++----
 .../spi/GridTcpSpiForwardingSelfTest.java       |  3 -
 .../ignite/testframework/GridTestUtils.java     | 14 +++
 .../config/GridTestProperties.java              | 14 ++-
 .../junits/IgniteTestResources.java             | 16 ++--
 .../ignite/testsuites/IgniteBasicTestSuite.java | 29 +++++--
 .../IgniteCacheFailoverTestSuite.java           | 14 ++-
 ...niteCacheP2pUnmarshallingErrorTestSuite.java | 20 ++++-
 .../ignite/testsuites/IgniteCacheTestSuite.java | 28 ++++--
 .../testsuites/IgniteKernalSelfTestSuite.java   | 14 ++-
 .../IgniteMarshallerSelfTestSuite.java          | 28 ++++--
 .../testsuites/IgniteUtilSelfTestSuite.java     | 18 +++-
 .../tests/p2p/P2PTestTaskExternalPath1.java     | 10 +--
 .../tests/p2p/P2PTestTaskExternalPath2.java     |  8 +-
 modules/indexing/pom.xml                        | 16 ++++
 .../cache/GridCacheCrossCacheQuerySelfTest.java |  2 -
 .../cache/GridCacheOffHeapSelfTest.java         |  1 -
 ...idCacheReduceQueryMultithreadedSelfTest.java | 10 ---
 .../processors/cache/GridCacheSwapSelfTest.java |  3 -
 .../IgniteCacheAbstractFieldsQuerySelfTest.java | 13 +--
 .../cache/IgniteCacheAbstractQuerySelfTest.java |  2 -
 ...hePartitionedQueryMultiThreadedSelfTest.java | 40 ++++-----
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |  1 -
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |  1 -
 .../query/h2/sql/GridQueryParsingTest.java      |  5 +-
 80 files changed, 452 insertions(+), 394 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java
index af03670..7abe05b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.marshaller.*;
 import org.apache.ignite.plugin.*;
 import org.apache.ignite.spi.*;
 
@@ -55,6 +56,11 @@ public class GridPluginContext implements PluginContext {
     }
 
     /** {@inheritDoc} */
+    @Override public MarshallerContext marshallerContext() {
+        return ctx.marshallerContext();
+    }
+
+    /** {@inheritDoc} */
     @Override public Collection<ClusterNode> nodes() {
         return ctx.discovery().allNodes();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
index 21f2264..2ec9825 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
@@ -41,6 +41,9 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
     /** */
     private final ConcurrentMap<Integer, String> map = new ConcurrentHashMap8<>();
 
+    /** */
+    private final Set<String> registeredSystemTypes = new HashSet<>();
+
     /**
      * Initializes context.
      */
@@ -107,7 +110,17 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
 
                 String clsName = line.trim();
 
-                map.put(clsName.hashCode(), clsName);
+                int typeId = clsName.hashCode();
+
+                String oldClsName;
+
+                if ((oldClsName = map.put(typeId, clsName)) != null) {
+                    if (!oldClsName.equals(clsName))
+                        throw new IgniteException("Duplicate type ID [id=" + typeId + ", clsName=" + clsName +
+                        ", oldClsName=" + oldClsName + ']');
+                }
+
+                registeredSystemTypes.add(clsName);
             }
         }
     }
@@ -116,12 +129,17 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
     @Override public boolean registerClass(int id, Class cls) throws IgniteCheckedException {
         boolean registered = true;
 
-        if (!map.containsKey(id)) {
+        String clsName = map.get(id);
+
+        if (clsName == null) {
             registered = registerClassName(id, cls.getName());
 
             if (registered)
                 map.putIfAbsent(id, cls.getName());
         }
+        else if (!clsName.equals(cls.getName()))
+            throw new IgniteCheckedException("Duplicate ID [id=" + id + ", oldCls=" + clsName +
+                ", newCls=" + cls.getName());
 
         return registered;
     }
@@ -133,7 +151,8 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
         if (clsName == null) {
             clsName = className(id);
 
-            assert clsName != null : id;
+            if (clsName == null)
+                throw new ClassNotFoundException("Unknown type ID: " + id);
 
             String old = map.putIfAbsent(id, clsName);
 
@@ -144,6 +163,11 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
         return U.forName(clsName, ldr);
     }
 
+    /** {@inheritDoc} */
+    @Override public boolean isSystemType(String typeName) {
+        return registeredSystemTypes.contains(typeName);
+    }
+
     /**
      * Registers class name.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
index e614408..4b0251d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
@@ -90,13 +90,9 @@ public class MarshallerContextImpl extends MarshallerContextAdapter {
         try {
             old = cache0.tryPutIfAbsent(id, clsName);
 
-            if (old != null && !old.equals(clsName)) {
-                U.quietAndWarn(log, "Type ID collision detected, may affect performance " +
-                    "(set idMapper property on marshaller to fix) [id=" + id + ", clsName1=" + clsName +
-                    "clsName2=" + old + ']');
-
-                return false;
-            }
+            if (old != null && !old.equals(clsName))
+                throw new IgniteCheckedException("Type ID collision detected [id=" + id + ", clsName1=" + clsName +
+                    ", clsName2=" + old + ']');
 
             failedCnt = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
index d8cc276..96639cd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
@@ -53,6 +53,8 @@ public class InteropIgnition {
 
         if (gridName != null)
             cfg.setGridName(gridName);
+        else
+            gridName = cfg.getGridName();
 
         InteropBootstrap bootstrap = bootstrap(factoryId);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
index 5432c90..8ebce35 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
@@ -566,57 +566,6 @@ public abstract class GridCacheMessage implements Message {
         return col;
     }
 
-    /**
-     * @param map Map to marshal.
-     * @param ctx Context.
-     * @return Marshalled map.
-     * @throws IgniteCheckedException If failed.
-     */
-    @SuppressWarnings("TypeMayBeWeakened") // Don't weaken type to clearly see that it's linked hash map.
-    @Nullable protected final LinkedHashMap<byte[], Boolean> marshalBooleanLinkedMap(
-        @Nullable LinkedHashMap<?, Boolean> map, GridCacheSharedContext ctx) throws IgniteCheckedException {
-        assert ctx != null;
-
-        if (map == null)
-            return null;
-
-        LinkedHashMap<byte[], Boolean> byteMap = U.newLinkedHashMap(map.size());
-
-        for (Map.Entry<?, Boolean> e : map.entrySet()) {
-            if (ctx.deploymentEnabled())
-                prepareObject(e.getKey(), ctx);
-
-            byteMap.put(CU.marshal(ctx, e.getKey()), e.getValue());
-        }
-
-        return byteMap;
-    }
-
-    /**
-     * @param byteMap Map to unmarshal.
-     * @param ctx Context.
-     * @param ldr Loader.
-     * @return Unmarshalled map.
-     * @throws IgniteCheckedException If failed.
-     */
-    @Nullable protected final <K1> LinkedHashMap<K1, Boolean> unmarshalBooleanLinkedMap(
-        @Nullable Map<byte[], Boolean> byteMap, GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
-        assert ldr != null;
-        assert ctx != null;
-
-        if (byteMap == null)
-            return null;
-
-        LinkedHashMap<K1, Boolean> map = U.newLinkedHashMap(byteMap.size());
-
-        Marshaller marsh = ctx.marshaller();
-
-        for (Map.Entry<byte[], Boolean> e : byteMap.entrySet())
-            map.put(marsh.<K1>unmarshal(e.getKey(), ldr), e.getValue());
-
-        return map;
-    }
-
     /** {@inheritDoc} */
     @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
         writer.setBuffer(buf);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/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 5582ba7..9b16388 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
@@ -265,7 +265,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         // Suppress warning if at least one ATOMIC cache found.
         perf.add("Enable ATOMIC mode if not using transactions (set 'atomicityMode' to ATOMIC)",
-            cfg.getAtomicityMode() == ATOMIC);
+                 cfg.getAtomicityMode() == ATOMIC);
 
         // Suppress warning if at least one non-FULL_SYNC mode found.
         perf.add("Disable fully synchronous writes (set 'writeSynchronizationMode' to PRIMARY_SYNC or FULL_ASYNC)",
@@ -784,8 +784,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         for (GridCacheAdapter<?, ?> cache : caches.values())
             onKernalStart(cache);
 
-        boolean utilityCacheStarted = false;
-
         // Wait for caches in SYNC preload mode.
         for (CacheConfiguration cfg : ctx.config().getCacheConfiguration()) {
             GridCacheAdapter cache = caches.get(maskNull(cfg.getName()));
@@ -796,11 +794,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                         (cfg.getCacheMode() == PARTITIONED && cfg.getRebalanceDelay() >= 0)) {
                         cache.preloader().syncFuture().get();
 
-                        if (CU.isUtilityCache(cache.name())) {
+                        if (CU.isUtilityCache(cache.name()))
                             ctx.cacheObjects().onUtilityCacheStarted();
-
-                            utilityCacheStarted = true;
-                        }
                     }
                 }
             }
@@ -808,7 +803,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         assert caches.containsKey(CU.MARSH_CACHE_NAME) : "Marshaller cache should be started";
         assert caches.containsKey(CU.UTILITY_CACHE_NAME) : "Utility cache should be started";
-        assert utilityCacheStarted;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
index f8e5a60..dc0d1e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
@@ -76,10 +76,9 @@ public interface IgniteCacheObjectProcessor extends GridProcessor {
     /**
      * Checks whether given class is portable.
      *
-     * @param cls Class.
-     * @return {@code true} If the class was registered as portable.
+     * @return {@code true} If portable objects are enabled.
      */
-    public boolean isPortableClass(Class<?> cls);
+    public boolean isPortableEnabled();
 
     /**
      * @param obj Portable object to get field from.
@@ -115,9 +114,11 @@ public interface IgniteCacheObjectProcessor extends GridProcessor {
     public Object unmarshal(CacheObjectContext ctx, byte[] bytes, ClassLoader clsLdr) throws IgniteCheckedException;
 
     /**
+     * @param ccfg Cache configuration.
      * @return Cache object context.
+     * @throws IgniteCheckedException If failed.
      */
-    public CacheObjectContext contextForCache(CacheConfiguration ccfg);
+    public CacheObjectContext contextForCache(CacheConfiguration ccfg) throws IgniteCheckedException;
 
     /**
      * @param ctx Cache context.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index 45fc121..3e59b10 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -185,7 +185,7 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public CacheObjectContext contextForCache(CacheConfiguration ccfg) {
+    @Override public CacheObjectContext contextForCache(CacheConfiguration ccfg) throws IgniteCheckedException {
         assert ccfg != null;
 
         CacheMemoryMode memMode = ccfg.getMemoryMode();
@@ -194,10 +194,14 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
             GridQueryProcessor.isEnabled(ccfg) ||
             !ccfg.isCopyOnRead();
 
-        return new CacheObjectContext(ctx,
+        CacheObjectContext res = new CacheObjectContext(ctx,
             ccfg.getAffinityMapper() != null ? ccfg.getAffinityMapper() : new GridCacheDefaultAffinityKeyMapper(),
-            ccfg.isCopyOnRead() && memMode == ONHEAP_TIERED,
+            ccfg.isCopyOnRead() && memMode != OFFHEAP_VALUES,
             storeVal);
+
+        ctx.resource().injectGeneric(res.defaultAffMapper());
+
+        return res;
     }
 
     /** {@inheritDoc} */
@@ -229,7 +233,7 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isPortableClass(Class<?> cls) {
+    @Override public boolean isPortableEnabled() {
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index ed8e573..26b0568 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -183,7 +183,13 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
 
         CacheConfiguration ccfg = ctx.cache().cacheConfiguration(cacheName);
 
-        this.cacheObjCtx = ctx.cacheObjects().contextForCache(ccfg);
+        try {
+            this.cacheObjCtx = ctx.cacheObjects().contextForCache(ccfg);
+        }
+        catch (IgniteCheckedException e) {
+            throw new IgniteException("Failed to initialize cache context.", e);
+        }
+
         this.cacheName = cacheName;
         this.flushQ = flushQ;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableInputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableInputStream.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableInputStream.java
index f630d01..501517b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableInputStream.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableInputStream.java
@@ -37,6 +37,16 @@ public interface GridPortableInputStream extends GridPortableStream {
     public byte[] readByteArray(int cnt);
 
     /**
+     * Reads {@code cnt} of bytes into byte array.
+     *
+     * @param arr Expected item count.
+     * @param off offset
+     * @param cnt number of bytes to read.
+     * @return actual length read.
+     */
+    public int read(byte[] arr, int off, int cnt);
+
+    /**
      * Read boolean value.
      *
      * @return Boolean value.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index e187713..fed90d5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -135,7 +135,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
                     TypeId typeId;
 
-                    if (valCls == null || ctx.cacheObjects().isPortableClass(valCls)) {
+                    if (valCls == null || ctx.cacheObjects().isPortableEnabled()) {
                         processPortableMeta(meta, desc);
 
                         typeId = new TypeId(ccfg.getName(), ctx.cacheObjects().typeId(meta.getValueType()));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 9016b10..a303abc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -7872,6 +7872,9 @@ public abstract class IgniteUtils {
         if (cls != null)
             return cls;
 
+        if (ldr == null)
+            ldr = gridClassLoader;
+
         ConcurrentMap<String, Class> ldrMap = classCache.get(ldr);
 
         if (ldrMap == null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java
index 7295760..9eda849 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java
@@ -39,7 +39,7 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
 public abstract class VisorMultiNodeTask<A, R, J> implements ComputeTask<VisorTaskArgument<A>, R> {
     /** Auto-injected grid instance. */
     @IgniteInstanceResource
-    protected IgniteEx ignite;
+    protected transient IgniteEx ignite;
 
     /** Debug flag. */
     protected boolean debug;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerContext.java b/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerContext.java
index f0e248a..dc131e8 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerContext.java
@@ -43,4 +43,12 @@ public interface MarshallerContext {
      * @throws IgniteCheckedException In case of any other error.
      */
     public Class getClass(int id, ClassLoader ldr) throws ClassNotFoundException, IgniteCheckedException;
+
+    /**
+     * Checks whether the given type is a system one - JDK class or Ignite class.
+     *
+     * @param typeName Type name.
+     * @return {@code true} if the type is a system one, {@code false} otherwise.
+     */
+    public boolean isSystemType(String typeName);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java b/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java
index 6a4f20b..b519bd1 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java
@@ -20,6 +20,7 @@ package org.apache.ignite.plugin;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.marshaller.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.discovery.DiscoverySpi;
 
@@ -40,6 +41,11 @@ public interface PluginContext {
     public Ignite grid();
 
     /**
+     * @return Marshaller context.
+     */
+    public MarshallerContext marshallerContext();
+
+    /**
      * Gets a collection of all grid nodes. Remote nodes are discovered via underlying
      * {@link DiscoverySpi} implementation used.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/config/tests.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/tests.properties b/modules/core/src/test/config/tests.properties
index 781b0f1..a9c6b77 100644
--- a/modules/core/src/test/config/tests.properties
+++ b/modules/core/src/test/config/tests.properties
@@ -129,7 +129,7 @@ ssh.username=uname
 ssh.password=passwd
 
 # SSL tests keystore.
-ssl.keystore.path=modules/clients/src/test/keystore/server.jks
+ssl.keystore.path=@{IGNITE_HOME}/modules/clients/src/test/keystore/server.jks
 ssl.keystore.password=123456
 
 # Hadoop home directory.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java
index d90bafe..3981b7f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java
@@ -100,7 +100,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
                 @Override public boolean apply(Event evt) {
                     assert evt.type() == EVT_NODE_JOINED;
 
-                    evts.put(cnt.getAndIncrement(), ((DiscoveryEvent) evt).topologyNodes());
+                    evts.put(cnt.getAndIncrement(), ((DiscoveryEvent)evt).topologyNodes());
 
                     latch.countDown();
 
@@ -147,6 +147,8 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testLeaveSequenceEvents() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-932");
+
         try {
             Ignite g0 = startGrid(0);
 
@@ -213,6 +215,8 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testMixedSequenceEvents() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-932");
+
         try {
             Ignite g0 = startGrid(0);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java
index a116d54..992d7bf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java
@@ -66,6 +66,8 @@ public class GridFailFastNodeFailureDetectionSelfTest extends GridCommonAbstract
      * @throws Exception If failed.
      */
     public void testFailFast() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-933");
+
         startGridsMultiThreaded(5);
 
         final CountDownLatch failLatch = new CountDownLatch(4);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java
index eb99ce1..d14ed0d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java
@@ -22,7 +22,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.failover.*;
 import org.apache.ignite.spi.failover.always.*;
@@ -77,8 +76,6 @@ public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTes
             }
         });
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
index 3af9b56..55fc2f7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.plugin.extensions.communication.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
@@ -90,7 +89,6 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest {
         cfg.setDiscoverySpi(discoSpi);
 
         cfg.setCommunicationSpi(new CommunicationSpi());
-        cfg.setMarshaller(new OptimizedMarshaller(false));
 
         CacheConfiguration ccfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java
index 0980010..ea04f35 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.collision.jobstealing.*;
 import org.apache.ignite.spi.failover.jobstealing.*;
@@ -290,8 +289,6 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest {
         cfg.setCollisionSpi(colSpi);
         cfg.setFailoverSpi(failSpi);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java
index 79fcdbc..3bdc9cf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java
@@ -56,8 +56,6 @@ public class GridProjectionLocalJobMultipleArgumentsSelfTest extends GridCommonA
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         CacheConfiguration cache = defaultCacheConfiguration();
 
         cache.setCacheMode(PARTITIONED);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java
index d16aa1f..3dcc8f8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridTaskExecutionContextSelfTest.java
@@ -40,15 +40,6 @@ public class GridTaskExecutionContextSelfTest extends GridCommonAbstractTest {
     private static final AtomicInteger CNT = new AtomicInteger();
 
     /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
         startGridsMultiThreaded(2);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java
index 4061881..610bec7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeEmptyClusterGroupTest.java
@@ -22,7 +22,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -51,8 +50,6 @@ public class IgniteComputeEmptyClusterGroupTest extends GridCommonAbstractTest {
 
         cfg.setDiscoverySpi(discoSpi);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         CacheConfiguration ccfg = defaultCacheConfiguration();
 
         ccfg.setCacheMode(PARTITIONED);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java
index 2db8062..14882ff 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteComputeTopologyExceptionTest.java
@@ -44,15 +44,6 @@ public class IgniteComputeTopologyExceptionTest extends GridCommonAbstractTest {
         stopAllGrids();
     }
 
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
-        return cfg;
-    }
-
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java
index f2afb07..ba61890 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java
@@ -78,6 +78,11 @@ public class GridDiscoveryManagerAliveCacheSelfTest extends GridCommonAbstractTe
     };
 
     /** {@inheritDoc} */
+    @Override protected long getTestTimeout() {
+        return 10 * 60 * 1000; //10 minutes.
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index eeb9f45..3f14f49 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -27,7 +27,6 @@ import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -204,8 +203,6 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
 
         cfg.setCacheConfiguration(cacheConfiguration(gridName));
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
index 5efe270..78ecf08 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
@@ -89,8 +89,6 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
             cfg.setCacheConfiguration();
         }
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 
@@ -171,7 +169,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
     /**
      * Test key.
      */
-    private static class AffinityTestKey {
+    protected static class AffinityTestKey {
         /** Affinity key. */
         @AffinityKeyMapped
         private final int affKey;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
index 9d4298d..f46a463 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -87,8 +86,6 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
 
         cfg.setConnectorConfiguration(null);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
index 625a429..981ba78 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
@@ -48,59 +48,28 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
     private static final int NULL_REF_SIZE = 1;
 
     /** Entry overhead. */
-    private static final int ENTRY_OVERHEAD;
+    private static int ENTRY_OVERHEAD;
 
     /** Replicated entry overhead. */
-    private static final int REPLICATED_ENTRY_OVERHEAD;
+    private static int REPLICATED_ENTRY_OVERHEAD;
 
     /** DHT entry overhead. */
-    private static final int DHT_ENTRY_OVERHEAD;
+    private static int DHT_ENTRY_OVERHEAD;
 
     /** Near entry overhead. */
-    private static final int NEAR_ENTRY_OVERHEAD;
+    private static int NEAR_ENTRY_OVERHEAD;
 
     /** Reader size. */
-    private static final int READER_SIZE = 24;
+    private static int READER_SIZE = 24;
 
     /** Key size in bytes. */
-    private static final int KEY_SIZE;
+    private static int KEY_SIZE;
 
     /** 1KB value size in bytes. */
-    private static final int ONE_KB_VAL_SIZE;
+    private static int ONE_KB_VAL_SIZE;
 
     /** 2KB value size in bytes. */
-    private static final int TWO_KB_VAL_SIZE;
-
-    /**
-     *
-     */
-    static {
-        try {
-            ENTRY_OVERHEAD = U.<Integer>staticField(GridCacheMapEntry.class, "SIZE_OVERHEAD");
-            DHT_ENTRY_OVERHEAD = U.<Integer>staticField(GridDhtCacheEntry.class, "DHT_SIZE_OVERHEAD");
-            NEAR_ENTRY_OVERHEAD = U.<Integer>staticField(GridNearCacheEntry.class, "NEAR_SIZE_OVERHEAD");
-            REPLICATED_ENTRY_OVERHEAD = DHT_ENTRY_OVERHEAD;
-
-            Marshaller marsh = new OptimizedMarshaller();
-
-            marsh.setContext(new MarshallerContext() {
-                @Override public boolean registerClass(int id, Class cls) {
-                    return true;
-                }
-
-                @Override public Class getClass(int id, ClassLoader ldr) {
-                    throw new UnsupportedOperationException();
-                }
-            });
-
-            KEY_SIZE = marsh.marshal(1).length;
-            ONE_KB_VAL_SIZE = marsh.marshal(new Value(new byte[1024])).length;
-            TWO_KB_VAL_SIZE = marsh.marshal(new Value(new byte[2048])).length;
-        }
-        catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
-        }
-    }
+    private static int TWO_KB_VAL_SIZE;
 
     /** Cache mode. */
     private CacheMode mode;
@@ -133,6 +102,50 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest {
         return cfg;
     }
 
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        try {
+            ENTRY_OVERHEAD = U.<Integer>staticField(GridCacheMapEntry.class, "SIZE_OVERHEAD");
+            DHT_ENTRY_OVERHEAD = U.<Integer>staticField(GridDhtCacheEntry.class, "DHT_SIZE_OVERHEAD");
+            NEAR_ENTRY_OVERHEAD = U.<Integer>staticField(GridNearCacheEntry.class, "NEAR_SIZE_OVERHEAD");
+            REPLICATED_ENTRY_OVERHEAD = DHT_ENTRY_OVERHEAD;
+
+            Marshaller marsh = createMarshaller();
+
+            KEY_SIZE = marsh.marshal(1).length;
+            ONE_KB_VAL_SIZE = marsh.marshal(new Value(new byte[1024])).length;
+            TWO_KB_VAL_SIZE = marsh.marshal(new Value(new byte[2048])).length;
+        }
+        catch (IgniteCheckedException e) {
+            throw new IgniteException(e);
+        }
+    }
+
+    /**
+     * Creates an instance of Marshaller that is used by caches during the test run.
+     *
+     * @return
+     */
+    protected Marshaller createMarshaller() throws IgniteCheckedException {
+        Marshaller marsh = new OptimizedMarshaller();
+
+        marsh.setContext(new MarshallerContext() {
+            @Override public boolean registerClass(int id, Class cls) {
+                return true;
+            }
+
+            @Override public Class getClass(int id, ClassLoader ldr) {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override public boolean isSystemType(String typeName) {
+                return false;
+            }
+        });
+
+        return marsh;
+    }
+
     /** @throws Exception If failed. */
     public void testLocal() throws Exception {
         mode = LOCAL;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
index b4e523e..5629a96 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
@@ -22,7 +22,6 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.lru.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -77,7 +76,6 @@ public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest {
         cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
 
         cfg.setCacheConfiguration(cacheConfiguration());
-        cfg.setMarshaller(new OptimizedMarshaller(false));
 
         return cfg;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java
index 35de371..7133ba8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java
@@ -22,7 +22,6 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -69,8 +68,6 @@ public class GridCacheReferenceCleanupSelfTest extends GridCommonAbstractTest {
 
         cfg.setCacheConfiguration(cacheCfg);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
index 1a62d4b..62a5b20 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
@@ -22,7 +22,6 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -95,8 +94,6 @@ public abstract class IgniteCacheAbstractTest extends GridCommonAbstractTest {
 
         cfg.setCacheConfiguration(cacheConfiguration(gridName));
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
index bb449e0..aa24eab 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
@@ -695,11 +695,11 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
             if (i % 2 == 0)
                 cache.put(key, i + 1);
             else
-                cache.invoke(key, new SetValueProcessor(i + 1));
+                cache.invoke(key, new EntrySetValueProcessor(i + 1));
         }
 
         // Invoke processor does not update value, should not trigger event.
-        assertEquals(String.valueOf(UPDATES), cache.invoke(key, new ToStringProcessor()));
+        assertEquals(String.valueOf(UPDATES), cache.invoke(key, new EntryToStringProcessor()));
 
         assertFalse(cache.putIfAbsent(key, -1));
 
@@ -1122,7 +1122,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
     /**
      *
      */
-    protected static class ToStringProcessor implements EntryProcessor<Integer, Integer, String> {
+    protected static class EntryToStringProcessor implements EntryProcessor<Integer, Integer, String> {
         /** {@inheritDoc} */
         @Override public String process(MutableEntry<Integer, Integer> e, Object... arguments)
             throws EntryProcessorException {
@@ -1131,21 +1131,21 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
 
         /** {@inheritDoc} */
         @Override public String toString() {
-            return S.toString(ToStringProcessor.class, this);
+            return S.toString(EntryToStringProcessor.class, this);
         }
     }
 
     /**
      *
      */
-    protected static class SetValueProcessor implements EntryProcessor<Integer, Integer, String> {
+    protected static class EntrySetValueProcessor implements EntryProcessor<Integer, Integer, String> {
         /** */
         private Integer val;
 
         /**
          * @param val Value to set.
          */
-        public SetValueProcessor(Integer val) {
+        public EntrySetValueProcessor(Integer val) {
             this.val = val;
         }
 
@@ -1159,7 +1159,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
 
         /** {@inheritDoc} */
         @Override public String toString() {
-            return S.toString(SetValueProcessor.class, this);
+            return S.toString(EntrySetValueProcessor.class, this);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java
index 412ad62..88cd623 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceMultiNodeAbstractTest.java
@@ -18,9 +18,7 @@
 package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 
 import java.util.*;
 
@@ -36,15 +34,6 @@ public abstract class GridCacheAtomicReferenceMultiNodeAbstractTest extends Igni
         return GRID_CNT;
     }
 
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
-        return cfg;
-    }
-
     /**
      * JUnit.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
index b39017e..33fe127 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
@@ -25,7 +25,6 @@ import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.testframework.*;
 
@@ -95,7 +94,6 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
         cfg.setSystemThreadPoolSize(RETRIES * 2);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
         cfg.setConnectorConfiguration(null);
 
         return cfg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java
index f45d860..3997ebc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.testframework.*;
 
@@ -71,15 +70,6 @@ public abstract class GridCacheQueueRotativeMultiNodeAbstractTest extends Ignite
         assert G.allGrids().isEmpty();
     }
 
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
-        return cfg;
-    }
-
     /**
      * JUnit.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
index 22af54a..6383f91 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
@@ -48,15 +48,6 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
     }
 
     /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CollectionConfiguration collectionConfiguration() {
         CollectionConfiguration colCfg = super.collectionConfiguration();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
index 0db5e95..f8a15bc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -60,8 +59,6 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
 
         cfg.setDiscoverySpi(disco);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java
index 9818176..e670a0a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java
@@ -21,7 +21,6 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lifecycle.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -80,7 +79,6 @@ public abstract class GridCachePreloadLifecycleAbstractTest extends GridCommonAb
         c.setDeploymentMode(DeploymentMode.SHARED);
         c.setNetworkTimeout(10000);
         c.setConnectorConfiguration(null);
-        c.setMarshaller(new OptimizedMarshaller(false));
 
 //        c.setPeerClassLoadingLocalClassPathExclude(GridCachePreloadLifecycleAbstractTest.class.getName(),
 //            MyValue.class.getName());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
index 5c1d674..62003e3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -99,8 +98,6 @@ public abstract class GridCacheAbstractTransformWriteThroughSelfTest extends Gri
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
 
         discoSpi.setIpFinder(IP_FINDER);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java
index ec3a3e4..28ef0a3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -72,8 +71,6 @@ public class GridCacheNearEvictionSelfTest extends GridCommonAbstractTest {
 
         c.setDiscoverySpi(disco);
 
-        c.setMarshaller(new OptimizedMarshaller(false));
-
         return c;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
index f5eb189..6138022 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -51,8 +50,6 @@ public class GridCachePartitionedHitsAndMissesSelfTest extends GridCommonAbstrac
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         // DiscoverySpi
         TcpDiscoverySpi disco = new TcpDiscoverySpi();
         disco.setIpFinder(IP_FINDER);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
index 6ccfbc2..8896840 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
@@ -22,7 +22,6 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -56,8 +55,6 @@ public abstract class GridCacheSwapScanQueryAbstractSelfTest extends GridCommonA
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         TcpDiscoverySpi disco = new TcpDiscoverySpi();
 
         disco.setIpFinder(ipFinder);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 378d5a3..4681071 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -99,8 +99,6 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
 
         cfg.setDiscoverySpi(disco);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java
index 0b178ff..381db74 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureProcessorSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -58,8 +57,6 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
 
         discoSpi.setIpFinder(ipFinder);
@@ -95,7 +92,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
     /**
      * Test runnable job.
      */
-    private static class TestRunnable implements IgniteRunnable {
+    private static class ClosureTestRunnable implements IgniteRunnable {
         /** */
         @IgniteInstanceResource
         private Ignite ignite;
@@ -130,7 +127,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
     /**
      * Test callable job.
      */
-    private static class TestCallable extends AbstractTestCallable {
+    private static class ClosureTestCallable extends AbstractTestCallable {
         /** {@inheritDoc} */
         @Override public Integer call() {
             log.info("Callable job executed on node: " + ignite.cluster().localNode().id());
@@ -144,11 +141,11 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
     /**
      * Test callable job which throws class not found exception.
      */
-    private static class TestCallableError extends AbstractTestCallable implements Externalizable {
+    private static class ClosureTestCallableError extends AbstractTestCallable implements Externalizable {
         /**
          *
          */
-        public TestCallableError() {
+        public ClosureTestCallableError() {
             // No-op.
         }
 
@@ -234,7 +231,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
      * @return Future object.
      */
     private ComputeTaskFuture<?> runAsync(int idx,
-        Collection<TestRunnable> jobs,
+        Collection<ClosureTestRunnable> jobs,
         @Nullable IgnitePredicate<ClusterNode> p)
     {
         assert idx >= 0 && idx < NODES_CNT;
@@ -302,7 +299,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
      * @param p Optional node predicate.
      * @return Future object.
      */
-    private ComputeTaskFuture<Collection<Integer>> callAsync(int idx, Collection<TestCallable> jobs,
+    private ComputeTaskFuture<Collection<Integer>> callAsync(int idx, Collection<ClosureTestCallable> jobs,
         @Nullable IgnitePredicate<ClusterNode> p) {
         assert idx >= 0 && idx < NODES_CNT;
         assert !F.isEmpty(jobs);
@@ -334,7 +331,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testRunAsyncSingle() throws Exception {
-        IgniteRunnable job = new TestRunnable();
+        IgniteRunnable job = new ClosureTestRunnable();
 
         ComputeTaskFuture<?> fut = broadcast(0, job, null);
 
@@ -360,7 +357,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testRunAsyncMultiple() throws Exception {
-        Collection<TestRunnable> jobs = F.asList(new TestRunnable(), new TestRunnable());
+        Collection<ClosureTestRunnable> jobs = F.asList(new ClosureTestRunnable(), new ClosureTestRunnable());
 
         ComputeTaskFuture<?> fut = runAsync(0, jobs, null);
 
@@ -374,7 +371,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testCallAsyncSingle() throws Exception {
-        IgniteCallable<Integer> job = new TestCallable();
+        IgniteCallable<Integer> job = new ClosureTestCallable();
 
         ComputeTaskFuture<Collection<Integer>> fut1 = broadcast(0, job, null);
 
@@ -404,7 +401,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
     public void testCallAsyncErrorNoFailover() throws Exception {
         IgniteCompute comp = compute(grid(0).cluster().forPredicate(F.notEqualTo(grid(0).localNode()))).withAsync();
 
-        comp.withNoFailover().call(new TestCallableError());
+        comp.withNoFailover().call(new ClosureTestCallableError());
 
         ComputeTaskFuture<Integer> fut = comp.future();
 
@@ -422,7 +419,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testWithName() throws Exception {
-        grid(0).compute().withName("TestTaskName").call(new TestCallable());
+        grid(0).compute().withName("TestTaskName").call(new ClosureTestCallable());
     }
 
     /**
@@ -460,7 +457,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testCallAsyncMultiple() throws Exception {
-        Collection<TestCallable> jobs = F.asList(new TestCallable(), new TestCallable());
+        Collection<ClosureTestCallable> jobs = F.asList(new ClosureTestCallable(), new ClosureTestCallable());
 
         ComputeTaskFuture<Collection<Integer>> fut = callAsync(0, jobs, null);
 
@@ -479,7 +476,7 @@ public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testReduceAsync() throws Exception {
-        Collection<TestCallable> jobs = F.asList(new TestCallable(), new TestCallable());
+        Collection<ClosureTestCallable> jobs = F.asList(new ClosureTestCallable(), new ClosureTestCallable());
 
         IgniteCompute comp = grid(0).compute().withAsync();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
index 9ffef4b..5ce2efd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
@@ -85,8 +85,6 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
         if (include)
             cfg.setUserAttributes(F.asMap("include", true));
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         return cfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
index 81751f2..80bf9e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
@@ -91,8 +91,6 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest {
 
         cfg.setIncludeProperties();
 
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
         if (useCache) {
             CacheConfiguration cc = defaultCacheConfiguration();
 
@@ -893,18 +891,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest {
             try (IgniteDataStreamer<String, TestObject> ldr = ignite.dataStreamer(null)) {
                 ldr.allowOverwrite(true);
 
-                ldr.receiver(new StreamReceiver<String, TestObject>() {
-                    @Override
-                    public void receive(IgniteCache<String, TestObject> cache,
-                        Collection<Map.Entry<String, TestObject>> entries) {
-                        for (Map.Entry<String, TestObject> e : entries) {
-                            assertTrue(e.getKey() instanceof String);
-                            assertTrue(e.getValue() instanceof TestObject);
-
-                            cache.put(e.getKey(), new TestObject(e.getValue().val + 1));
-                        }
-                    }
-                });
+                ldr.receiver(getStreamReceiver());
 
                 for (int i = 0; i < 100; i++)
                     ldr.addData(String.valueOf(i), new TestObject(i));
@@ -927,14 +914,14 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest {
     /**
      *
      */
-    private static class TestObject {
+    public static class TestObject {
         /** Value. */
-        private final int val;
+        public final int val;
 
         /**
          * @param val Value.
          */
-        private TestObject(int val) {
+        public TestObject(int val) {
             this.val = val;
         }
 
@@ -958,6 +945,13 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @return Stream receiver.
+     */
+    protected StreamReceiver<String, TestObject> getStreamReceiver() {
+        return new TestDataReceiver();
+    }
+
+    /**
      *
      */
     @SuppressWarnings("PublicInnerClass")
@@ -977,4 +971,20 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest {
             storeMap.remove(key);
         }
     }
+
+    /**
+     *
+     */
+    private static class TestDataReceiver implements StreamReceiver<String, TestObject> {
+        /** {@inheritDoc} */
+        @Override public void receive(IgniteCache<String, TestObject> cache,
+            Collection<Map.Entry<String, TestObject>> entries) {
+            for (Map.Entry<String, TestObject> e : entries) {
+                assertTrue(e.getKey() instanceof String);
+                assertTrue(e.getValue() instanceof TestObject);
+
+                cache.put(e.getKey(), new TestObject(e.getValue().val + 1));
+            }
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/37c56f69/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java
index bdf9929..c81ed56 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java
@@ -644,7 +644,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
                             try {
                                 client = createClient(U.getLocalHost(), PORT, U.getLocalHost());
 
-                                MessageWithId msg = new MessageWithId();
+                                MessageWithId msg = new MessageWithId(idProvider.getAndIncrement());
 
                                 byte[] data = serializeMessage(msg);
 
@@ -746,7 +746,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
                         client = createClient(U.getLocalHost(), PORT, U.getLocalHost());
 
                         while (cntr.getAndIncrement() < MSG_CNT * THREAD_CNT) {
-                            MessageWithId msg = new MessageWithId();
+                            MessageWithId msg = new MessageWithId(idProvider.getAndIncrement());
 
                             byte[] data = serializeMessage(msg);
 
@@ -1408,7 +1408,14 @@ public class GridNioSelfTest extends GridCommonAbstractTest {
      */
     private static class MessageWithId implements Serializable {
         /** */
-        private final int id = idProvider.getAndIncrement();
+        private final int id;
+
+        /**
+         * @param id Message ID.
+         */
+        public MessageWithId(int id) {
+            this.id = id;
+        }
 
         /** */
         @SuppressWarnings({"unused"})