ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [07/41] incubator-ignite git commit: IGNITE-35 Fixed tests.
Date Fri, 23 Jan 2015 08:47:42 GMT
IGNITE-35 Fixed tests.


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

Branch: refs/heads/ignite-49
Commit: 80e8ba18583c7f6026b654129945fe9fb1f7de3e
Parents: a176321
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Thu Dec 18 18:09:44 2014 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Fri Dec 19 16:29:13 2014 +0300

----------------------------------------------------------------------
 .../spi/checkpoint/s3/GridS3CheckpointSpi.java  |  16 +-
 .../GridClientAbstractMultiNodeSelfTest.java    |   1 -
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |   1 -
 .../sharedfs/SharedFsCheckpointSpi.java         |  18 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  29 +--
 .../discovery/tcp/TcpClientDiscoverySpi.java    |  18 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   5 +-
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |   9 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |   1 -
 .../resource/GridResourceProcessor.java         |  10 +-
 .../GridP2PDifferentClassLoaderSelfTest.java    |   8 +-
 .../p2p/GridP2PHotRedeploymentSelfTest.java     |  19 +-
 .../p2p/GridP2PLocalDeploymentSelfTest.java     |  18 +-
 .../grid/p2p/GridP2PNodeLeftSelfTest.java       |  21 +-
 .../p2p/GridP2PSameClassLoaderSelfTest.java     |  33 +--
 .../testframework/junits/GridTestIgnite.java    | 224 +++++++++++++++++++
 .../testframework/junits/GridTestResources.java |   2 +
 .../tests/p2p/GridP2PTestTaskExternalPath1.java |  11 +-
 .../tests/p2p/GridP2PTestTaskExternalPath2.java |  11 +-
 .../grid/kernal/GridFactorySelfTest.java        |   2 -
 .../p2p/GridP2PUserVersionChangeSelfTest.java   |  21 +-
 .../testsuites/bamboo/GridSpringTestSuite.java  |   1 -
 .../grid/p2p/GridP2PDisabledSelfTest.java       |   3 +-
 23 files changed, 327 insertions(+), 155 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
----------------------------------------------------------------------
diff --git a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
index 55b4ba0..55eb046 100644
--- a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
+++ b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
@@ -14,7 +14,6 @@ import com.amazonaws.auth.*;
 import com.amazonaws.services.s3.*;
 import com.amazonaws.services.s3.model.*;
 import org.apache.ignite.*;
-import org.apache.ignite.marshaller.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
 import org.gridgain.grid.*;
@@ -99,8 +98,9 @@ public class GridS3CheckpointSpi extends IgniteSpiAdapter implements CheckpointS
     @IgniteLoggerResource
     private IgniteLogger log;
 
-    /** Marshaller. */
-    private IgniteMarshaller marsh;
+    /** Ignite instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
 
     /** Task that takes care about outdated files. */
     private GridS3TimeoutWorker timeoutWrk;
@@ -231,12 +231,6 @@ public class GridS3CheckpointSpi extends IgniteSpiAdapter implements CheckpointS
         this.cred = cred;
     }
 
-    @IgniteInstanceResource
-    public void setIgnite(Ignite ignite) {
-        if (ignite != null)
-            marsh = ignite.configuration().getMarshaller();
-    }
-
     /** {@inheritDoc} */
     @SuppressWarnings({"BusyWait"})
     @Override public void spiStart(String gridName) throws IgniteSpiException {
@@ -456,7 +450,7 @@ public class GridS3CheckpointSpi extends IgniteSpiAdapter implements CheckpointS
             InputStream in = obj.getObjectContent();
 
             try {
-                return marsh.unmarshal(in, U.gridClassLoader());
+                return ignite.configuration().getMarshaller().unmarshal(in, U.gridClassLoader());
             }
             finally {
                 U.closeQuiet(in);
@@ -484,7 +478,7 @@ public class GridS3CheckpointSpi extends IgniteSpiAdapter implements CheckpointS
         if (log.isDebugEnabled())
             log.debug("Writing data to S3 [bucket=" + bucketName + ", key=" + data.getKey() + ']');
 
-        byte[] buf = marsh.marshal(data);
+        byte[] buf = ignite.configuration().getMarshaller().marshal(data);
 
         ObjectMetadata meta = new ObjectMetadata();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/clients/src/test/java/org/gridgain/client/integration/GridClientAbstractMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/gridgain/client/integration/GridClientAbstractMultiNodeSelfTest.java b/modules/clients/src/test/java/org/gridgain/client/integration/GridClientAbstractMultiNodeSelfTest.java
index 84109fd..220834b 100644
--- a/modules/clients/src/test/java/org/gridgain/client/integration/GridClientAbstractMultiNodeSelfTest.java
+++ b/modules/clients/src/test/java/org/gridgain/client/integration/GridClientAbstractMultiNodeSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.gridgain.client.*;
 import org.gridgain.client.balancer.*;
 import org.gridgain.client.ssl.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.managers.communication.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
index 2905182..8bc30f6 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.authentication.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.managers.communication.*;
 import org.gridgain.grid.kernal.managers.eventstorage.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java
index 1eab95a..ffe2e6f 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.marshaller.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
 import org.apache.ignite.spi.checkpoint.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -114,8 +113,9 @@ public class SharedFsCheckpointSpi extends IgniteSpiAdapter implements Checkpoin
     @IgniteLoggerResource
     private IgniteLogger log;
 
-    /** Grid marshaller. */
-    private IgniteMarshaller marsh;
+    /** Ignite instance. */
+    @IgniteInstanceResource
+    private Ignite ignite;
 
     /** List of checkpoint directories where all files are stored. */
     private Queue<String> dirPaths = new LinkedList<>();
@@ -176,12 +176,6 @@ public class SharedFsCheckpointSpi extends IgniteSpiAdapter implements Checkpoin
         this.dirPaths.addAll(dirPaths);
     }
 
-    @IgniteInstanceResource
-    public void setIgnite(Ignite ignite) {
-        if (ignite != null)
-            marsh = ignite.configuration().getMarshaller();
-    }
-
     /** {@inheritDoc} */
     @Override public void spiStart(String gridName) throws IgniteSpiException {
         // Start SPI start stopwatch.
@@ -289,6 +283,8 @@ public class SharedFsCheckpointSpi extends IgniteSpiAdapter implements Checkpoin
         if (folder != null) {
             Map<File, SharedFsTimeData> files = new HashMap<>();
 
+            IgniteMarshaller marsh = ignite.configuration().getMarshaller();
+
             // Track expiration for only those files that are made by this node
             // to avoid file access conflicts.
             for (File file : getFiles()) {
@@ -360,7 +356,7 @@ public class SharedFsCheckpointSpi extends IgniteSpiAdapter implements Checkpoin
 
         if (file.exists())
             try {
-                SharedFsCheckpointData data = SharedFsUtils.read(file, marsh, log);
+                SharedFsCheckpointData data = SharedFsUtils.read(file, ignite.configuration().getMarshaller(), log);
 
                 return data != null ?
                     data.getExpireTime() == 0 || data.getExpireTime() > U.currentTimeMillis() ?
@@ -408,7 +404,7 @@ public class SharedFsCheckpointSpi extends IgniteSpiAdapter implements Checkpoin
 
             try {
                 SharedFsUtils.write(file, new SharedFsCheckpointData(state, expireTime, host, key),
-                    marsh, log);
+                    ignite.configuration().getMarshaller(), log);
             }
             catch (IOException e) {
                 // Select next shared directory if exists, otherwise throw exception

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index e8a16bd..04ff772 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -14,7 +14,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.*;
 import org.apache.ignite.product.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
@@ -634,6 +633,9 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     /** Local port which node uses to accept shared memory connections. */
     private int shmemPort = DFLT_SHMEM_PORT;
 
+    /** Grid name. */
+    private String gridName;
+
     /** Allocate direct buffer or heap buffer. */
     private boolean directBuf = true;
 
@@ -872,17 +874,16 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     }
 
     /**
-     * Sets {@link Ignite ignite}.
+     * Injects resources.
      *
      * @param ignite Ignite.
      */
-    @IgniteSpiConfiguration(optional = true)
     @IgniteInstanceResource
-    public void setIgnite(Ignite ignite) {
-        // Inject resources.
-        if (ignite != null && ignite.configuration() != null) {
+    protected void injectResources(Ignite ignite) {
+        if (ignite != null) {
             setAddressResolver(ignite.configuration().getAddressResolver());
             setLocalAddress(ignite.configuration().getLocalHost());
+            gridName = ignite.name();
         }
     }
 
@@ -1556,7 +1557,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                         .listener(srvLsnr)
                         .logger(log)
                         .selectorCount(selectorsCnt)
-                        .gridName(ignite.name())
+                        .gridName(gridName)
                         .tcpNoDelay(tcpNoDelay)
                         .directBuffer(directBuf)
                         .byteOrder(ByteOrder.nativeOrder())
@@ -1614,7 +1615,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
         for (int port = shmemPort; port < shmemPort + locPortRange; port++) {
             try {
                 GridIpcSharedMemoryServerEndpoint srv =
-                    new GridIpcSharedMemoryServerEndpoint(log, ignite.configuration().getNodeId(), ignite.name());
+                    new GridIpcSharedMemoryServerEndpoint(log, ignite.configuration().getNodeId(), gridName);
 
                 srv.setPort(port);
 
@@ -2450,7 +2451,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
          * @param srv Server.
          */
         ShmemAcceptWorker(GridIpcSharedMemoryServerEndpoint srv) {
-            super(ignite.name(), "shmem-communication-acceptor", log);
+            super(gridName, "shmem-communication-acceptor", log);
 
             this.srv = srv;
         }
@@ -2494,7 +2495,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
          * @param endpoint Endpoint.
          */
         private ShmemWorker(GridIpcEndpoint endpoint) {
-            super(ignite.name(), "shmem-worker", log);
+            super(gridName, "shmem-worker", log);
 
             this.endpoint = endpoint;
         }
@@ -2549,7 +2550,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
          *
          */
         IdleClientWorker() {
-            super(ignite.name(), "nio-idle-client-collector", log);
+            super(gridName, "nio-idle-client-collector", log);
         }
 
         /** {@inheritDoc} */
@@ -2662,7 +2663,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
          *
          */
         ClientFlushWorker() {
-            super(ignite.name(), "nio-client-flusher", log);
+            super(gridName, "nio-client-flusher", log);
         }
 
         /** {@inheritDoc} */
@@ -2728,7 +2729,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
          *
          */
         SocketTimeoutWorker() {
-            super(ignite.name(), "tcp-comm-sock-timeout-worker", log);
+            super(gridName, "tcp-comm-sock-timeout-worker", log);
         }
 
         /**
@@ -2811,7 +2812,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
          *
          */
         private RecoveryWorker() {
-            super(ignite.name(), "tcp-comm-recovery-worker", log);
+            super(gridName, "tcp-comm-recovery-worker", log);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index bb97ea6..c5b417d 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -413,7 +413,8 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
                         locNode.clientRouterNodeId(rmtNodeId);
 
                         TcpDiscoveryAbstractMessage msg = recon ?
-                            new TcpDiscoveryClientReconnectMessage(ignite.configuration().getNodeId(), rmtNodeId, lastMsgId) :
+                            new TcpDiscoveryClientReconnectMessage(ignite.configuration().getNodeId(), rmtNodeId,
+                                lastMsgId) :
                             new TcpDiscoveryJoinRequestMessage(locNode, null);
 
                         msg.client(true);
@@ -647,7 +648,8 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
                 while (!isInterrupted()) {
                     U.sleep(hbFreq);
 
-                    TcpDiscoveryHeartbeatMessage msg = new TcpDiscoveryHeartbeatMessage(ignite.configuration().getNodeId());
+                    TcpDiscoveryHeartbeatMessage msg =
+                        new TcpDiscoveryHeartbeatMessage(ignite.configuration().getNodeId());
 
                     msg.client(true);
 
@@ -743,8 +745,8 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
                     }
                     catch (IgniteCheckedException e) {
                         if (log.isDebugEnabled())
-                            U.error(log, "Failed to read message [sock=" + sock0 + ", locNodeId=" + ignite.configuration().getNodeId() +
-                                ", rmtNodeId=" + nodeId + ']', e);
+                            U.error(log, "Failed to read message [sock=" + sock0 + ", " +
+                                "locNodeId=" + ignite.configuration().getNodeId() + ", rmtNodeId=" + nodeId + ']', e);
 
                         IOException ioEx = X.cause(e, IOException.class);
 
@@ -758,15 +760,15 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp
                                 "(make sure same versions of all classes are available on all nodes) " +
                                 "[rmtNodeId=" + nodeId + ", err=" + clsNotFoundEx.getMessage() + ']');
                         else
-                            LT.error(log, e, "Failed to read message [sock=" + sock0 + ", locNodeId=" + ignite.configuration().getNodeId() +
-                                ", rmtNodeId=" + nodeId + ']');
+                            LT.error(log, e, "Failed to read message [sock=" + sock0 + ", locNodeId=" +
+                                ignite.configuration().getNodeId() + ", rmtNodeId=" + nodeId + ']');
                     }
                 }
             }
             catch (IOException e) {
                 if (log.isDebugEnabled())
-                    U.error(log, "Connection failed [sock=" + sock0 + ", locNodeId=" + ignite.configuration().getNodeId() +
-                        ", rmtNodeId=" + nodeId + ']', e);
+                    U.error(log, "Connection failed [sock=" + sock0 + ", locNodeId=" +
+                        ignite.configuration().getNodeId() + ", rmtNodeId=" + nodeId + ']', e);
             }
             finally {
                 U.closeQuiet(sock0);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index b8a4ddf..5433689 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
 import org.gridgain.grid.*;
@@ -277,8 +276,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
 
     /** {@inheritDoc} */
     @IgniteInstanceResource
-    @Override public void setIgnite(Ignite ignite) {
-        super.setIgnite(ignite);
+    @Override public void injectResources(Ignite ignite) {
+        super.injectResources(ignite);
 
         // Inject resource.
         if (ignite != null)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
index 7fe9ce4..f775d17 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
@@ -132,22 +132,17 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements Discov
     /** Statistics. */
     protected final TcpDiscoveryStatistics stats = new TcpDiscoveryStatistics();
 
-    /** Grid instance. */
-    protected Ignite ignite;
-
     /** Logger. */
     @IgniteLoggerResource
     protected IgniteLogger log;
 
     /**
-     * Sets {@link Ignite ignite}.
+     * Inject resources
      *
      * @param ignite Ignite.
      */
     @IgniteInstanceResource
-    public void setIgnite(Ignite ignite) {
-        this.ignite = ignite;
-
+    protected void injectResources(Ignite ignite) {
         // Inject resource.
         if (ignite != null)
             setLocalAddress(ignite.configuration().getLocalHost());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
index 693a6e8..a23c716 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
@@ -11,7 +11,6 @@ package org.apache.ignite.spi.swapspace.file;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
 import org.gridgain.grid.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
index f73a37f..23ffed7 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
@@ -290,8 +290,11 @@ public class GridResourceProcessor extends GridProcessorAdapter {
                     ioc.inject(job, IgniteSpringResource.class, springBeanInjector, dep, taskCls);
                 else if (annCls == IgniteLoggerResource.class)
                     ioc.inject(job, IgniteLoggerResource.class, logInjector, dep, taskCls);
-                else if (annCls == IgniteServiceResource.class)
+                else {
+                    assert annCls == IgniteServiceResource.class;
+
                     ioc.inject(job, IgniteServiceResource.class, srvcInjector, dep, taskCls);
+                }
             }
         }
     }
@@ -349,8 +352,11 @@ public class GridResourceProcessor extends GridProcessorAdapter {
                 ioc.inject(obj, IgniteSpringResource.class, springBeanInjector, dep, taskCls);
             else if (annCls == IgniteLoggerResource.class)
                 ioc.inject(obj, IgniteLoggerResource.class, logInjector, dep, taskCls);
-            else if (annCls == IgniteServiceResource.class)
+            else {
+                assert annCls == IgniteServiceResource.class;
+
                 ioc.inject(obj, IgniteServiceResource.class, srvcInjector, dep, taskCls);
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PDifferentClassLoaderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PDifferentClassLoaderSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PDifferentClassLoaderSelfTest.java
index 89451a4..3533b3f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PDifferentClassLoaderSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PDifferentClassLoaderSelfTest.java
@@ -95,13 +95,13 @@ public class GridP2PDifferentClassLoaderSelfTest extends GridCommonAbstractTest
             }
 
             // Execute task1 and task2 from node1 on node2 and make sure that they reuse same class loader on node2.
-            int[] res1 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
-            int[] res2 = (int[]) ignite1.compute().execute(task2, ignite2.cluster().localNode().id());
+            Integer res1 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res2 = ignite1.compute().execute(task2, ignite2.cluster().localNode().id());
 
             if (expectEquals)
-                assert Arrays.equals(res1, res2);
+                assert res1.equals(res2);
             else
-                assert isNotSame(res1, res2);
+                assert !res1.equals(res2);
         }
         finally {
             stopGrid(1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PHotRedeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PHotRedeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PHotRedeploymentSelfTest.java
index 484030e..94471a1 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PHotRedeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PHotRedeploymentSelfTest.java
@@ -103,10 +103,10 @@ public class GridP2PHotRedeploymentSelfTest extends GridCommonAbstractTest {
             ClassLoader ldr1 = getExternalClassLoader();
             ClassLoader ldr2 = getExternalClassLoader();
 
-            Class<? extends ComputeTask<Object, int[]>> taskCls1 =
-                (Class<? extends ComputeTask<Object, int[]>>)ldr1.loadClass(TASK_NAME);
-            Class<? extends ComputeTask<Object, int[]>> taskCls2 =
-                (Class<? extends ComputeTask<Object, int[]>>)ldr2.loadClass(TASK_NAME);
+            Class<? extends ComputeTask<Object, Integer>> taskCls1 =
+                (Class<? extends ComputeTask<Object, Integer>>)ldr1.loadClass(TASK_NAME);
+            Class<? extends ComputeTask<Object, Integer>> taskCls2 =
+                (Class<? extends ComputeTask<Object, Integer>>)ldr2.loadClass(TASK_NAME);
 
             // Check that different instances used.
             assert taskCls1.getClassLoader() != taskCls2.getClassLoader();
@@ -126,20 +126,19 @@ public class GridP2PHotRedeploymentSelfTest extends GridCommonAbstractTest {
 
             ignite2.compute().localDeployTask(taskCls1, taskCls1.getClassLoader());
 
-            int[] res1 = ignite1.compute().execute(taskCls1, Collections.singletonList(ignite2.cluster().localNode().id()));
+            Integer res1 = ignite1.compute().execute(taskCls1, Collections.singletonList(ignite2.cluster().localNode().id()));
 
             assert res1 != null;
 
-            info("Result1: " + Arrays.toString(res1));
+            info("Result1: " + res1);
 
-            int[] res2 = ignite1.compute().execute(taskCls2, Collections.singletonList(ignite2.cluster().localNode().id()));
+            Integer res2 = ignite1.compute().execute(taskCls2, Collections.singletonList(ignite2.cluster().localNode().id()));
 
             assert res2 != null;
 
-            info("Result2: " + Arrays.toString(res2));
+            info("Result2: " + res2);
 
-            assert res1[0] != res2[0];
-            assert res1[1] != res2[1];
+            assert !res1.equals(res2);
 
 //            Thread.sleep(P2P_TIMEOUT * 2);
 //

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
index e0b4dce..bf94b5c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
@@ -101,14 +101,13 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest {
 
             taskCls = ldr2.loadClass("org.gridgain.grid.tests.p2p.GridP2PTestTaskExternalPath1");
 
-            int[] res1 = (int[]) ignite2.compute().execute(taskCls, ignite1.cluster().localNode().id());
+            Integer res1 = ignite2.compute().execute(taskCls, ignite1.cluster().localNode().id());
 
             taskCls = ldr3.loadClass("org.gridgain.grid.tests.p2p.GridP2PTestTaskExternalPath1");
 
-            int[] res2 = (int[]) ignite3.compute().execute(taskCls, ignite1.cluster().localNode().id());
+            Integer res2 = ignite3.compute().execute(taskCls, ignite1.cluster().localNode().id());
 
-            assert res1[0] != res2[0]; // Resources are not same.
-            assert res1[1] != res2[1]; // Class loaders are not same.
+            assert !res1.equals(res2); // Resources are not same.
         }
         finally {
             stopGrid(1);
@@ -138,15 +137,14 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest {
             Class task1 = ldr1.loadClass("org.gridgain.grid.tests.p2p.GridP2PTestTaskExternalPath1");
             Class task2 = ldr2.loadClass("org.gridgain.grid.tests.p2p.GridP2PTestTaskExternalPath1");
 
-            int[] res1 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res1 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
 
-            int[] res2 = (int[]) ignite2.compute().execute(task2, ignite1.cluster().localNode().id());
+            Integer res2 = ignite2.compute().execute(task2, ignite1.cluster().localNode().id());
 
-            assert res1[1] != res2[1]; // Class loaders are not same.
-            assert res1[0] != res2[0]; // Resources are not same.
+            assert !res1.equals(res2); // Class loaders are not same.
 
-            assert res1[1] != System.identityHashCode(ldr1);
-            assert res2[1] != System.identityHashCode(ldr2);
+            assert !res1.equals(System.identityHashCode(ldr1));
+            assert !res2.equals(System.identityHashCode(ldr2));
         }
         finally {
             stopGrid(1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PNodeLeftSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PNodeLeftSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PNodeLeftSelfTest.java
index 6031d58..1dbca52 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PNodeLeftSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PNodeLeftSelfTest.java
@@ -68,19 +68,19 @@ public class GridP2PNodeLeftSelfTest extends GridCommonAbstractTest {
 
             Class task1 = urlClsLdr1.loadClass("org.gridgain.grid.tests.p2p.GridP2PTestTaskExternalPath1");
 
-            int[] res1 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res1 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
 
             stopGrid(1);
 
             Thread.sleep(1000);
 
             // Task will be deployed after stop node1
-            int[] res2 = (int[]) ignite3.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res2 = ignite3.compute().execute(task1, ignite2.cluster().localNode().id());
 
             if (isExpectUndeploy)
-                assert isNotSame(res1, res2);
+                assert !res1.equals(res2);
             else
-                assert Arrays.equals(res1, res2);
+                assert res1.equals(res2);
         }
         finally {
             stopGrid(1);
@@ -110,17 +110,4 @@ public class GridP2PNodeLeftSelfTest extends GridCommonAbstractTest {
 
         processTest(true);
     }
-
-    /**
-     * Return true if and only if all elements of array are different.
-     *
-     * @param m1 array 1.
-     * @param m2 array 2.
-     * @return true if all elements of array are different.
-     */
-    private boolean isNotSame(int[] m1, int[] m2) {
-        assert m1.length == m2.length;
-        assert m1.length == 2;
-        return m1[0] != m2[0] && m1[1] != m2[1];
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PSameClassLoaderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PSameClassLoaderSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PSameClassLoaderSelfTest.java
index 36e5e4f..1baf401 100644
--- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PSameClassLoaderSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PSameClassLoaderSelfTest.java
@@ -79,30 +79,15 @@ public class GridP2PSameClassLoaderSelfTest extends GridCommonAbstractTest {
             Class task2 = CLASS_LOADER.loadClass(TEST_TASK2_NAME);
 
             // Execute task1 and task2 from node1 on node2 and make sure that they reuse same class loader on node2.
-            int[] res1 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
-            int[] res2 = (int[]) ignite1.compute().execute(task2, ignite2.cluster().localNode().id());
-
-            if (isIsolatedDifferentTask) {
-                assert res1[0] != res2[0]; // Resources are not same
-                assert res1[1] == res2[1]; // Class loaders are same
-            }
-            else
-                assert Arrays.equals(res1, res2);
-
-            int[] res3 = (int[]) ignite3.compute().execute(task1, ignite2.cluster().localNode().id());
-            int[] res4 = (int[]) ignite3.compute().execute(task2, ignite2.cluster().localNode().id());
-
-            if (isIsolatedDifferentTask) {
-                assert res3[0] != res4[0]; // Resources are not same
-                assert res3[1] == res4[1]; // Class loaders are same
-            }
-            else
-                assert Arrays.equals(res3, res4);
-
-            if (isIsolatedDifferentNode)
-                assert isNotSame(res1, res4);
-            else
-                assert Arrays.equals(res1, res4);
+            Integer res1 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res2 = ignite1.compute().execute(task2, ignite2.cluster().localNode().id());
+
+            assert res1.equals(res2); // Class loaders are same
+
+            Integer res3 = ignite3.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res4 = ignite3.compute().execute(task2, ignite2.cluster().localNode().id());
+
+            assert res3.equals(res4);
         }
         finally {
             stopGrid(1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestIgnite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestIgnite.java b/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestIgnite.java
new file mode 100644
index 0000000..d5415d6
--- /dev/null
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestIgnite.java
@@ -0,0 +1,224 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.testframework.junits;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.marshaller.IgniteMarshaller;
+import org.apache.ignite.plugin.*;
+import org.apache.ignite.plugin.security.*;
+import org.apache.ignite.product.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.hadoop.*;
+import org.jetbrains.annotations.*;
+
+import javax.management.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Ignite mock.
+ */
+public class GridTestIgnite implements Ignite {
+    /** Ignite name */
+    private final String name;
+
+    /** Local host. */
+    private final String locHost;
+
+    /** */
+    private final UUID nodeId;
+
+    /** */
+    private IgniteMarshaller marshaller;
+
+    /** */
+    private final MBeanServer jmx;
+
+    /** */
+    private final String home;
+
+    /**
+     * Mock values
+     *
+     * @param name Name.
+     * @param locHost Local host.
+     * @param nodeId Node ID.
+     * @param marshaller Marshaller.
+     * @param jmx Jmx Bean Server.
+     * @param home Ignite home.
+     */
+    public GridTestIgnite(
+        String name, String locHost, UUID nodeId, IgniteMarshaller marshaller, MBeanServer jmx, String home) {
+        this.locHost = locHost;
+        this.nodeId = nodeId;
+        this.marshaller = marshaller;
+        this.jmx = jmx;
+        this.home = home;
+        this.name = name;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String name() {
+        return name;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteLogger log() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteConfiguration configuration() {
+        IgniteConfiguration cfg = new IgniteConfiguration();
+
+        cfg.setMarshaller(marshaller);
+        cfg.setNodeId(nodeId);
+        cfg.setMBeanServer(jmx);
+        cfg.setGridGainHome(home);
+        cfg.setLocalHost(locHost);
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteCluster cluster() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteCompute compute() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteCompute compute(ClusterGroup prj) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteMessaging message() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteMessaging message(ClusterGroup prj) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteEvents events() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteEvents events(ClusterGroup prj) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteManaged managed() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteManaged managed(ClusterGroup prj) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public ExecutorService executorService() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public ExecutorService executorService(ClusterGroup prj) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteProduct product() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteScheduler scheduler() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public GridSecurity security() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgnitePortables portables() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K, V> GridCache<K, V> cache(@Nullable String name) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<GridCache<?, ?>> caches() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K, V> IgniteCache<K, V> jcache(@Nullable String name) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteTransactions transactions() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K, V> IgniteDataLoader<K, V> dataLoader(@Nullable String cacheName) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteFs fileSystem(String name) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<IgniteFs> fileSystems() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public GridHadoop hadoop() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteStreamer streamer(@Nullable String name) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<IgniteStreamer> streamers() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public <T extends IgnitePlugin> T plugin(String name) throws PluginNotFoundException {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void close() throws IgniteCheckedException {}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java b/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
index 8b7acf3..51d374e 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
@@ -159,6 +159,8 @@ public class GridTestResources {
         assert getLogger() != null;
 
         rsrcProc.injectBasicResource(target, IgniteLoggerResource.class, getLogger().getLogger(target.getClass()));
+        rsrcProc.injectBasicResource(target, IgniteInstanceResource.class,
+            new GridTestIgnite(null, locHost, nodeId, marshaller, jmx, home));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java b/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
index 2f18ace..0a5bdff 100644
--- a/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
+++ b/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 
@@ -22,7 +21,7 @@ import java.util.*;
 /**
  * Test P2P task.
  */
-public class GridP2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, int[]> {
+public class GridP2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, Integer> {
     /** */
     @IgniteLoggerResource
     private IgniteLogger log;
@@ -73,7 +72,7 @@ public class GridP2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, int
     /**
      * {@inheritDoc}
      */
-    @Override public int[] reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
+    @Override public Integer reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
         return results.get(0).getData();
     }
 
@@ -115,7 +114,7 @@ public class GridP2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, int
         }
 
         /** {@inheritDoc} */
-        @Override public int[] execute() throws IgniteCheckedException {
+        @Override public Integer execute() throws IgniteCheckedException {
             assert g.configuration().getNodeId().equals(argument(0));
 
             log.info("Running job on node: " + g.cluster().localNode().id());
@@ -131,9 +130,7 @@ public class GridP2PTestTaskExternalPath1 extends ComputeTaskAdapter<Object, int
                 }
             }
 
-            return new int[] {
-                System.identityHashCode(ses.getClassLoader())
-            };
+            return System.identityHashCode(ses.getClassLoader());
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java b/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
index 2c0ef3c..6804d3c 100644
--- a/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
+++ b/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 
@@ -22,7 +21,7 @@ import java.util.*;
 /**
  * Simple test task.
  */
-public class GridP2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, int[]> {
+public class GridP2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, Integer> {
     /** */
     @IgniteLoggerResource
     private IgniteLogger log;
@@ -73,7 +72,7 @@ public class GridP2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, int
     /**
      * {@inheritDoc}
      */
-    @Override public int[] reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
+    @Override public Integer reduce(List<ComputeJobResult> results) throws IgniteCheckedException {
         return results.get(0).getData();
     }
 
@@ -110,7 +109,7 @@ public class GridP2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, int
         /**
          * {@inheritDoc}
          */
-        @Override public int[] execute() throws IgniteCheckedException {
+        @Override public Integer execute() throws IgniteCheckedException {
             assert ignite.configuration().getNodeId().equals(argument(0));
 
             if (sleep) {
@@ -124,9 +123,7 @@ public class GridP2PTestTaskExternalPath2 extends ComputeTaskAdapter<Object, int
                 }
             }
 
-            return new int[] {
-                System.identityHashCode(ses.getClassLoader())
-            };
+            return System.identityHashCode(ses.getClassLoader());
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
index 5cbf218..ef069f0 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lifecycle.*;
-import org.apache.ignite.marshaller.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
 import org.gridgain.grid.*;
@@ -36,7 +35,6 @@ import org.springframework.context.*;
 import org.springframework.context.support.*;
 import org.springframework.core.io.*;
 
-import javax.management.*;
 import java.io.*;
 import java.net.*;
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PUserVersionChangeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PUserVersionChangeSelfTest.java b/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PUserVersionChangeSelfTest.java
index a8dba75..e26c85a 100644
--- a/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PUserVersionChangeSelfTest.java
+++ b/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PUserVersionChangeSelfTest.java
@@ -141,7 +141,7 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest {
                 }
             }, EVT_TASK_UNDEPLOYED);
 
-            int[] res1 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res1 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
 
             stopGrid(1);
 
@@ -149,10 +149,9 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest {
 
             ignite1 = startGrid(1);
 
-            int[] res2 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res2 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
 
-            assert res1[0] != res2[0];
-            assert res1[1] != res2[1];
+            assert !res1.equals(res2);
 
             // Allow P2P timeout to expire.
             assert undeployed.await(30000, MILLISECONDS);
@@ -190,18 +189,17 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest {
                 }
             }, EVT_TASK_UNDEPLOYED);
 
-            int[] res1 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res1 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
 
             stopGrid(1);
 
             ignite1 = startGrid(1);
 
-            int[] res2 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res2 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
 
             assert !undeployed.await(3000, MILLISECONDS);
 
-            assert res1[0] == res2[0];
-            assert res1[1] == res2[1];
+            assert res1.equals(res2);
         }
         finally {
             stopGrid(1);
@@ -247,7 +245,7 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest {
                 }
             }, EVT_NODE_LEFT);
 
-            int[] res1 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res1 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
 
             stopGrid(1);
 
@@ -257,10 +255,9 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest {
 
             ignite1 = startGrid(1);
 
-            int[] res2 = (int[]) ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
+            Integer res2 = ignite1.compute().execute(task1, ignite2.cluster().localNode().id());
 
-            assert res1[0] != res2[0];
-            assert res1[1] != res2[1];
+            assert !res1.equals(res2);
         }
         finally {
             stopGrid(1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/spring/src/test/java/org/gridgain/testsuites/bamboo/GridSpringTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/gridgain/testsuites/bamboo/GridSpringTestSuite.java b/modules/spring/src/test/java/org/gridgain/testsuites/bamboo/GridSpringTestSuite.java
index e643936..ee68acd 100644
--- a/modules/spring/src/test/java/org/gridgain/testsuites/bamboo/GridSpringTestSuite.java
+++ b/modules/spring/src/test/java/org/gridgain/testsuites/bamboo/GridSpringTestSuite.java
@@ -33,7 +33,6 @@ public class GridSpringTestSuite extends TestSuite {
 
         // Tests moved to this suite since they require Spring functionality.
         suite.addTest(new TestSuite(GridP2PUserVersionChangeSelfTest.class));
-        suite.addTest(new TestSuite(GridP2PContinuousLocalDeploySelfTest.class));
 
         suite.addTest(new TestSuite(GridSpringCacheManagerSelfTest.class));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80e8ba18/modules/urideploy/src/test/java/org/gridgain/grid/p2p/GridP2PDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/gridgain/grid/p2p/GridP2PDisabledSelfTest.java b/modules/urideploy/src/test/java/org/gridgain/grid/p2p/GridP2PDisabledSelfTest.java
index 387e29d..bfcab4f 100644
--- a/modules/urideploy/src/test/java/org/gridgain/grid/p2p/GridP2PDisabledSelfTest.java
+++ b/modules/urideploy/src/test/java/org/gridgain/grid/p2p/GridP2PDisabledSelfTest.java
@@ -138,10 +138,9 @@ public class GridP2PDisabledSelfTest extends GridCommonAbstractTest {
                     Ignite ignite1 = startGrid(1);
                     Ignite ignite2 = startGrid(2);
 
-                    int[] res = ignite1.compute().<UUID, int[]>execute(TASK_NAME, ignite2.cluster().localNode().id());
+                    Integer res = ignite1.compute().<UUID, Integer>execute(TASK_NAME, ignite2.cluster().localNode().id());
 
                     assert res != null;
-                    assert res.length == 2;
                 }
                 finally {
                     stopGrid(1);


Mime
View raw message