ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [15/41] incubator-ignite git commit: Merge from sprint-1 into ignite-35
Date Fri, 23 Jan 2015 08:47:50 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/GridS3CheckpointSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/clients/src/test/java/org/gridgain/client/integration/GridClientAbstractMultiNodeSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
index ada2e0c,e6cdee5..638055f
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
@@@ -68,14 -79,19 +79,14 @@@ import java.util.concurrent.*
   * grid resources. Both, field and method based injections are supported. The following
grid
   * resources can be injected:
   * <ul>
-  * <li>{@link org.apache.ignite.resources.IgniteTaskSessionResource}</li>
-  * <li>{@link org.apache.ignite.resources.IgniteInstanceResource}</li>
-  * <li>{@link org.apache.ignite.resources.IgniteLoggerResource}</li>
-  * <li>{@link org.apache.ignite.resources.IgniteSpringApplicationContextResource}</li>
-  * <li>{@link org.apache.ignite.resources.IgniteSpringResource}</li>
+  * <li>{@link IgniteTaskSessionResource}</li>
+  * <li>{@link IgniteInstanceResource}</li>
+  * <li>{@link IgniteLoggerResource}</li>
 - * <li>{@link IgniteHomeResource}</li>
 - * <li>{@link IgniteExecutorServiceResource}</li>
 - * <li>{@link IgniteLocalNodeIdResource}</li>
 - * <li>{@link IgniteMBeanServerResource}</li>
 - * <li>{@link IgniteMarshallerResource}</li>
+  * <li>{@link IgniteSpringApplicationContextResource}</li>
+  * <li>{@link IgniteSpringResource}</li>
   * </ul>
   * Refer to corresponding resource documentation for more information.
-  * Here is an example of how to inject instance of {@link org.apache.ignite.Ignite} into
a computation:
+  * Here is an example of how to inject instance of {@link Ignite} into a computation:
   * <pre name="code" class="java">
   * public class MyGridJob extends GridRunnable {
   *      ...

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/IgniteManaged.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/IgniteManaged.java
index c8fdd65,33353d1..7d40663
--- a/modules/core/src/main/java/org/apache/ignite/IgniteManaged.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteManaged.java
@@@ -73,10 -82,15 +82,10 @@@ import java.util.*
   * grid resources. Both, field and method based injections are supported. The following
grid
   * resources can be injected:
   * <ul>
-  * <li>{@link org.apache.ignite.resources.IgniteInstanceResource}</li>
-  * <li>{@link org.apache.ignite.resources.IgniteLoggerResource}</li>
-  * <li>{@link org.apache.ignite.resources.IgniteSpringApplicationContextResource}</li>
-  * <li>{@link org.apache.ignite.resources.IgniteSpringResource}</li>
+  * <li>{@link IgniteInstanceResource}</li>
+  * <li>{@link IgniteLoggerResource}</li>
 - * <li>{@link IgniteHomeResource}</li>
 - * <li>{@link IgniteExecutorServiceResource}</li>
 - * <li>{@link IgniteLocalNodeIdResource}</li>
 - * <li>{@link IgniteMBeanServerResource}</li>
 - * <li>{@link IgniteMarshallerResource}</li>
+  * <li>{@link IgniteSpringApplicationContextResource}</li>
+  * <li>{@link IgniteSpringResource}</li>
   * </ul>
   * Refer to corresponding resource documentation for more information.
   * <h1 class="header">Service Example</h1>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/compute/ComputeJob.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/compute/ComputeTask.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/configuration/IgniteDeploymentMode.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/resources/IgniteInstanceResource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoggerResource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringApplicationContextResource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringResource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 5433689,e5573e6..005ad53
--- 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
@@@ -1271,8 -1273,7 +1279,8 @@@ public class TcpDiscoverySpi extends Tc
  
                      Map<String, Object> attrs = new HashMap<>(locNode.attributes());
  
 -                    attrs.put(GridNodeAttributes.ATTR_SECURITY_SUBJECT, gridMarsh.marshal(subj));
 +                    attrs.put(GridNodeAttributes.ATTR_SECURITY_SUBJECT,
-                             ignite.configuration().getMarshaller().marshal(subj));
++                        ignite.configuration().getMarshaller().marshal(subj));
                      attrs.remove(GridNodeAttributes.ATTR_SECURITY_CREDENTIALS);
  
                      locNode.setAttributes(attrs);
@@@ -3142,8 -3135,7 +3150,8 @@@
                          // Stick in authentication subject to node (use security-safe attributes
for copy).
                          Map<String, Object> attrs = new HashMap<>(node.getAttributes());
  
 -                        attrs.put(GridNodeAttributes.ATTR_SECURITY_SUBJECT, gridMarsh.marshal(subj));
 +                        attrs.put(GridNodeAttributes.ATTR_SECURITY_SUBJECT,
-                                 ignite.configuration().getMarshaller().marshal(subj));
++                            ignite.configuration().getMarshaller().marshal(subj));
  
                          node.setAttributes(attrs);
                      }
@@@ -5144,8 -5119,8 +5152,8 @@@
                  assert msg.verified() : msg;
  
                  if (log.isDebugEnabled())
 -                    log.debug("Redirecting message to client [sock=" + sock + ", locNodeId="
+ locNodeId +
 -                        ", rmtNodeId=" + nodeId + ", msg=" + msg + ']');
 +                    log.debug("Redirecting message to client [sock=" + sock + ", locNodeId="
+
-                             ignite.configuration().getNodeId() + ", rmtNodeId=" + nodeId
+ ", msg=" + msg + ']');
++                        ignite.configuration().getNodeId() + ", rmtNodeId=" + nodeId + ",
msg=" + msg + ']');
  
                  try {
                      prepareNodeAddedMessage(msg, nodeId, null, null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryServerEndpoint.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/GridTcpClientDiscoverySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridCancelOnGridStopSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridExplicitImplicitDeploymentSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverCustomTopologySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTopologySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobContextSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleSpisSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridMultipleVersionsDeploymentSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridRuntimeExceptionSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithCancelSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridStopWithWaitSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskInstantiationSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/managers/checkpoint/GridCheckpointTaskSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/kernal/processors/continuous/GridMessageListenSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PDifferentClassLoaderSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PHotRedeploymentSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PNodeLeftSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PSameClassLoaderSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/loadtests/direct/stealing/GridStealingLoadTestJob.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/loadtests/job/GridJobLoadTestJob.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestKernalContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridExternalCacheQueryReducerClosure.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PAwareTestUserResource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PEventFilterExternalPath1.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PEventFilterExternalPath2.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath1.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/extdata/p2p/src/main/java/org/gridgain/grid/tests/p2p/GridP2PTestTaskExternalPath2.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
index 0000000,2e6cb47..1987bba
mode 000000,100644..100644
--- a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
@@@ -1,0 -1,219 +1,215 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ 
+ package org.apache.ignite.spi.communication.tcp;
+ 
+ import org.apache.ignite.*;
+ import org.apache.ignite.compute.*;
+ 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.discovery.tcp.*;
+ import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+ import org.gridgain.grid.cache.*;
+ import org.gridgain.grid.cache.query.*;
+ import org.gridgain.grid.kernal.*;
+ import org.gridgain.grid.kernal.managers.communication.*;
+ import org.gridgain.grid.kernal.processors.cache.query.*;
+ import org.gridgain.grid.util.direct.*;
+ import org.gridgain.grid.util.typedef.internal.*;
+ import org.gridgain.testframework.junits.common.*;
+ import org.jetbrains.annotations.*;
+ 
+ import java.util.*;
+ import java.util.concurrent.*;
+ 
+ import static java.util.concurrent.TimeUnit.*;
+ import static org.gridgain.grid.cache.GridCacheMode.*;
+ import static org.gridgain.grid.cache.GridCachePreloadMode.*;
+ 
+ /**
+  *
+  */
+ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
+     /** IP finder. */
+     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+ 
+     /** Cancel latch. */
+     private static CountDownLatch cancelLatch;
+ 
+     /** Process response latch. */
+     private static CountDownLatch resLatch;
+ 
+     /** Finish latch. */
+     private static CountDownLatch finishLatch;
+ 
+     /** {@inheritDoc} */
+     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+         IgniteConfiguration cfg = super.getConfiguration(gridName);
+ 
+         GridCacheConfiguration cache = defaultCacheConfiguration();
+ 
+         cache.setCacheMode(PARTITIONED);
+         cache.setPreloadMode(NONE);
+ 
+         cfg.setCacheConfiguration(cache);
+ 
+         cfg.setCommunicationSpi(new CommunicationSpi());
+ 
+         TcpDiscoverySpi disco = new TcpDiscoverySpi();
+ 
+         disco.setIpFinder(IP_FINDER);
+ 
+         cfg.setDiscoverySpi(disco);
+ 
+         return cfg;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override protected void beforeTest() throws Exception {
+         cancelLatch = new CountDownLatch(1);
+         resLatch = new CountDownLatch(1);
+         finishLatch = new CountDownLatch(1);
+ 
+         startGridsMultiThreaded(2);
+     }
+ 
+     /** {@inheritDoc} */
+     @Override protected void afterTest() throws Exception {
+         stopAllGrids();
+     }
+ 
+     /**
+      * @throws Exception If failed.
+      */
+     public void testQuery() throws Exception {
+         GridCacheQueryFuture<Map.Entry<Object, Object>> fut =
+             grid(0).cache(null).queries().createSqlQuery(String.class, "_key is not null").execute();
+ 
+         testMessageSet(fut);
+     }
+ 
+     /**
+      * @throws Exception If failed.
+      */
+     public void testTask() throws Exception {
+         ComputeTaskFuture<?> fut = executeAsync(compute(grid(0).forRemotes()), Task.class,
null);
+ 
+         testMessageSet(fut);
+     }
+ 
+     /**
+      * @throws Exception If failed.
+      */
+     public void testTaskException() throws Exception {
+         ComputeTaskFuture<?> fut = executeAsync(compute(grid(0).forRemotes()), FailTask.class,
null);
+ 
+         testMessageSet(fut);
+     }
+ 
+     /**
+      * @param fut Future to cancel.
+      * @throws Exception If failed.
+      */
+     private void testMessageSet(IgniteFuture<?> fut) throws Exception {
+         cancelLatch.await();
+ 
+         assertTrue(fut.cancel());
+ 
+         resLatch.countDown();
+ 
+         assertTrue(U.await(finishLatch, 5000, MILLISECONDS));
+ 
+         Map map = U.field(((GridKernal)grid(0)).context().io(), "msgSetMap");
+ 
+         info("Map: " + map);
+ 
+         assertTrue(map.isEmpty());
+     }
+ 
+     /**
+      * Communication SPI.
+      */
+     private static class CommunicationSpi extends TcpCommunicationSpi {
 -        /** */
 -        @IgniteMarshallerResource
 -        private IgniteMarshaller marsh;
 -
+         /** {@inheritDoc} */
+         @Override protected void notifyListener(UUID sndId, GridTcpCommunicationMessageAdapter
msg,
+             IgniteRunnable msgC) {
+             try {
+                 GridIoMessage ioMsg = (GridIoMessage)msg;
+ 
+                 boolean wait = ioMsg.message() instanceof GridCacheQueryResponse ||
+                         ioMsg.message() instanceof GridJobExecuteResponse;
+ 
+                 if (wait) {
+                     cancelLatch.countDown();
+ 
+                     assertTrue(U.await(resLatch, 5000, MILLISECONDS));
+                 }
+ 
+                 super.notifyListener(sndId, msg, msgC);
+ 
+                 if (wait)
+                     finishLatch.countDown();
+             }
+             catch (Exception e) {
+                 fail("Unexpected error: " + e);
+             }
+         }
+     }
+ 
+     /**
+      * Test task.
+      */
+     @ComputeTaskSessionFullSupport
+     private static class Task extends ComputeTaskSplitAdapter<Void, Void> {
+         /** {@inheritDoc} */
+         @Override protected Collection<? extends ComputeJob> split(int gridSize, Void
arg) throws IgniteCheckedException {
+             return Collections.singleton(new ComputeJobAdapter() {
+                 @Nullable @Override public Object execute() {
+                     return null;
+                 }
+             });
+         }
+ 
+         /** {@inheritDoc} */
+         @Nullable @Override public Void reduce(List<ComputeJobResult> results) throws
IgniteCheckedException {
+             return null;
+         }
+     }
+ 
+     /**
+      * Test task.
+      */
+     @ComputeTaskSessionFullSupport
+     private static class FailTask extends ComputeTaskSplitAdapter<Void, Void> {
+         /** {@inheritDoc} */
+         @Override protected Collection<? extends ComputeJob> split(int gridSize, Void
arg) throws IgniteCheckedException {
+             return Collections.singleton(new ComputeJobAdapter() {
+                 @Nullable @Override public Object execute() throws IgniteCheckedException
{
+                     throw new IgniteCheckedException("Task failed.");
+                 }
+             });
+         }
+ 
+         /** {@inheritDoc} */
+         @Nullable @Override public Void reduce(List<ComputeJobResult> results) throws
IgniteCheckedException {
+             return null;
+         }
+     }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/spring/src/test/java/org/gridgain/grid/kernal/GridFactorySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/spring/src/test/java/org/gridgain/grid/kernal/processors/resource/GridResourceProcessorSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/spring/src/test/java/org/gridgain/grid/p2p/GridP2PUserVersionChangeSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/spring/src/test/java/org/gridgain/testsuites/GridResourceSelfTestSuite.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/spring/src/test/java/org/gridgain/testsuites/bamboo/GridSpringTestSuite.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7e87fe9/modules/urideploy/src/test/java/org/gridgain/grid/p2p/GridP2PDisabledSelfTest.java
----------------------------------------------------------------------


Mime
View raw message