Repository: incubator-ignite Updated Branches: refs/heads/ignite-709_2 7625bdcaf -> 7449c6056
# IGNITE-709 Add TcpClientDiscoverySpiConfigSelfTest. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7449c605 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7449c605 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7449c605 Branch: refs/heads/ignite-709_2 Commit: 7449c6056b8c0963a2a807f4f45902df0c739e2b Parents: 7625bdc Author: sevdokimov <sevdoki...@gridgain.com> Authored: Thu May 7 16:56:58 2015 +0300 Committer: sevdokimov <sevdoki...@gridgain.com> Committed: Thu May 7 16:56:58 2015 +0300 ---------------------------------------------------------------------- .../TcpClientDiscoverySpiConfigSelfTest.java | 38 ++++++++++++++++++++ .../IgniteSpiDiscoverySelfTestSuite.java | 1 + 2 files changed, 39 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7449c605/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java new file mode 100644 index 0000000..06924b7 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiConfigSelfTest.java @@ -0,0 +1,38 @@ +/* + * 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.discovery.tcp; + +import org.apache.ignite.testframework.junits.spi.*; + +/** + * + */ +@GridSpiTest(spi = TcpClientDiscoverySpi.class, group = "Discovery SPI") +public class TcpClientDiscoverySpiConfigSelfTest extends GridSpiAbstractConfigTest<TcpDiscoverySpi> { + /** + * @throws Exception If failed. + */ + public void testNegativeConfig() throws Exception { + checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "ipFinder", null); + checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "networkTimeout", 0); + checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "socketTimeout", 0); + checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "ackTimeout", 0); + checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "heartbeatFrequency", 0); + checkNegativeSpiProperty(new TcpClientDiscoverySpi(), "threadPriority", -1); + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7449c605/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java index 09ba42b..bb0b97d 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java @@ -52,6 +52,7 @@ public class IgniteSpiDiscoverySelfTestSuite extends TestSuite { suite.addTest(new TestSuite(GridTcpSpiForwardingSelfTest.class)); suite.addTest(new TestSuite(TcpClientDiscoverySelfTest.class)); + suite.addTest(new TestSuite(TcpClientDiscoverySpiConfigSelfTest.class)); return suite; }