Repository: ignite Updated Branches: refs/heads/ignite-3264 fa2c585f8 -> ec0c52dba
Fixed unrelated test. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a56a1148 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a56a1148 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a56a1148 Branch: refs/heads/ignite-3264 Commit: a56a1148abad29338f82760ebdb73f9fcf09730f Parents: fa2c585 Author: vozerov-gridgain <voze...@gridgain.com> Authored: Wed Jun 8 09:20:48 2016 +0300 Committer: vozerov-gridgain <voze...@gridgain.com> Committed: Wed Jun 8 09:20:48 2016 +0300 ---------------------------------------------------------------------- .../igfs/IgfsProcessorValidationSelfTest.java | 38 +++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/a56a1148/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java index 0ce1036..29bb2cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java @@ -445,27 +445,41 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ - public void testInvalidEndpointTcpPort() throws Exception { + public void testZeroEndpointTcpPort() throws Exception { + checkIvalidPort(0); + } + + /** + * @throws Exception If failed. + */ + public void testNegativeEndpointTcpPort() throws Exception { + checkIvalidPort(-1); + } + + /** + * @throws Exception If failed. + */ + public void testTooBigEndpointTcpPort() throws Exception { + checkIvalidPort(65536); + } + + /** + * Check invalid port handling. + * + * @param port Port. + * @throws Exception If failed. + */ + private void checkIvalidPort(int port) throws Exception { final String failMsg = "IGFS endpoint TCP port is out of range"; g1Cfg.setCacheConfiguration(concat(dataCaches(1024), metaCaches(), CacheConfiguration.class)); final String igfsCfgName = "igfs-cfg"; final IgfsIpcEndpointConfiguration igfsEndpointCfg = new IgfsIpcEndpointConfiguration(); - igfsEndpointCfg.setPort(0); + igfsEndpointCfg.setPort(port); g1IgfsCfg1.setName(igfsCfgName); g1IgfsCfg1.setIpcEndpointConfiguration(igfsEndpointCfg); checkGridStartFails(g1Cfg, failMsg, true); - - igfsEndpointCfg.setPort(-1); - g1IgfsCfg1.setIpcEndpointConfiguration(igfsEndpointCfg); - - checkGridStartFails(g1Cfg, failMsg, true); - - igfsEndpointCfg.setPort(65536); - g1IgfsCfg1.setIpcEndpointConfiguration(igfsEndpointCfg); - - checkGridStartFails(g1Cfg, failMsg, true); } /**