# ignite-51
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a5e9abcc Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a5e9abcc Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a5e9abcc Branch: refs/heads/ignite-394 Commit: a5e9abcc5bac7a607a1426d8b012615201b37df3 Parents: 6031b87 Author: sboikov <sboi...@gridgain.com> Authored: Wed Mar 11 11:32:47 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Wed Mar 11 11:32:47 2015 +0300 ---------------------------------------------------------------------- .../communication/GridCacheMessageSelfTest.java | 37 ++++++++++++++++++-- .../testsuites/IgniteKernalSelfTestSuite.java | 2 ++ 2 files changed, 37 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5e9abcc/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java index 09eba0a..e28931b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/GridCacheMessageSelfTest.java @@ -1,3 +1,20 @@ +/* + * 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; import org.apache.ignite.cache.*; @@ -7,6 +24,9 @@ import org.apache.ignite.internal.managers.communication.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.plugin.extensions.communication.*; +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.apache.ignite.testframework.junits.common.*; import java.nio.*; @@ -20,9 +40,18 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; * Messaging test. */ public class GridCacheMessageSelfTest extends GridCommonAbstractTest { + /** IP finder. */ + private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); + /** Sample count. */ private static final int SAMPLE_CNT = 1; + /** */ + public static final String TEST_BODY = "Test body"; + + /** + * + */ static { GridIoMessageFactory.registerCustom(TestMessage.DIRECT_TYPE, new CO<Message>() { @Override public Message apply() { @@ -49,12 +78,16 @@ public class GridCacheMessageSelfTest extends GridCommonAbstractTest { }); } - public static final String TEST_BODY = "Test body"; - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); + TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); + + discoSpi.setIpFinder(ipFinder); + + cfg.setDiscoverySpi(discoSpi); + cfg.setIncludeEventTypes((int[])null); CacheConfiguration ccfg = new CacheConfiguration(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5e9abcc/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 dd0e4be..ebd3202 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 @@ -28,6 +28,7 @@ import org.apache.ignite.internal.managers.swapspace.*; 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.*; /** * Kernal self test suite. @@ -51,6 +52,7 @@ public class IgniteKernalSelfTestSuite extends TestSuite { suite.addTestSuite(GridEventStorageManagerSelfTest.class); suite.addTestSuite(GridSwapSpaceManagerSelfTest.class); suite.addTestSuite(GridCommunicationSendMessageSelfTest.class); + suite.addTestSuite(GridCacheMessageSelfTest.class); suite.addTestSuite(GridDeploymentManagerStopSelfTest.class); suite.addTestSuite(GridManagerStopSelfTest.class); suite.addTestSuite(GridDiscoveryManagerAttributesSelfTest.class);