ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: eneble statistics
Date Thu, 26 Mar 2015 13:39:03 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-tc-jclient eab0ef7ef -> 91c195b32


eneble statistics


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

Branch: refs/heads/ignite-tc-jclient
Commit: 91c195b32b936e5dc8d639ce755239b96e0ae840
Parents: eab0ef7
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Thu Mar 26 16:39:34 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Thu Mar 26 16:39:34 2015 +0300

----------------------------------------------------------------------
 .../JettyRestProcessorAbstractSelfTest.java     | 35 ------------
 .../JettyRestProcessorUnsignedSelfTest.java     | 59 ++++++++++++++++++++
 2 files changed, 59 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91c195b3/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index 145c752..9cd2f3b 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -17,11 +17,7 @@
 
 package org.apache.ignite.internal.processors.rest;
 
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
-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 java.io.*;
 import java.net.*;
@@ -36,9 +32,6 @@ import static org.apache.ignite.IgniteSystemProperties.*;
  */
 @SuppressWarnings("unchecked")
 abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorSelfTest {
-    /** IP finder. */
-    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
     /** Grid count. */
     private static final int GRID_CNT = 3;
 
@@ -50,34 +43,6 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
     }
 
     /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
-        IgniteConfiguration cfg = getConfiguration(gridName, getTestResources());
-
-        cfg.setNodeId(null);
-
-        cfg.setLocalHost(LOC_HOST);
-
-        assert cfg.getConnectorConfiguration() == null;
-
-        ConnectorConfiguration clientCfg = new ConnectorConfiguration();
-
-        clientCfg.setJettyPath("modules/clients/src/test/resources/jetty/rest-jetty.xml");
-
-        cfg.setConnectorConfiguration(clientCfg);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(IP_FINDER);
-
-        cfg.setDiscoverySpi(disco);
-
-        cfg.setCacheConfiguration(defaultCacheConfiguration());
-
-        return cfg;
-    }
-
-
-    /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91c195b3/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorUnsignedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorUnsignedSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorUnsignedSelfTest.java
index e6598d3..82965e8 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorUnsignedSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorUnsignedSelfTest.java
@@ -17,12 +17,71 @@
 
 package org.apache.ignite.internal.processors.rest;
 
+import org.apache.ignite.configuration.*;
+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 java.net.*;
 
 /**
  *
  */
 public class JettyRestProcessorUnsignedSelfTest extends JettyRestProcessorAbstractSelfTest
{
+    /** IP finder. */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+    
+    /** {@inheritDoc} */
+    protected IgniteConfiguration getConfiguration2(String gridName) throws Exception {
+        // GridAbstractTest
+        IgniteConfiguration cfg = getConfiguration(gridName, getTestResources());
+        cfg.setNodeId(null);
+        // ClientDefaultCacheSelfTest
+        cfg.setLocalHost(LOC_HOST);
+        assert cfg.getConnectorConfiguration() == null;
+        ConnectorConfiguration clientCfg = new ConnectorConfiguration();
+        
+        clientCfg.setJettyPath("modules/clients/src/test/resources/jetty/rest-jetty.xml");
+        
+        cfg.setConnectorConfiguration(clientCfg);
+        TcpDiscoverySpi disco = new TcpDiscoverySpi();
+        disco.setIpFinder(IP_FINDER);
+        cfg.setDiscoverySpi(disco);
+        CacheConfiguration ccfg = defaultCacheConfiguration();
+        
+        // ----
+        
+        cfg.setCacheConfiguration(ccfg);
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+        // GridAbstractTest
+        IgniteConfiguration cfg = getConfiguration(gridName, getTestResources());
+        cfg.setNodeId(null);
+        // AbstractRestProcessorSelfTest
+        cfg.setLocalHost(LOC_HOST);
+        assert cfg.getConnectorConfiguration() == null;
+        ConnectorConfiguration clientCfg = new ConnectorConfiguration();
+
+        clientCfg.setJettyPath("modules/clients/src/test/resources/jetty/rest-jetty.xml");
// From ClientDefaultCacheSelfTest
+        
+        cfg.setConnectorConfiguration(clientCfg);
+        TcpDiscoverySpi disco = new TcpDiscoverySpi();
+        disco.setIpFinder(IP_FINDER);
+        cfg.setDiscoverySpi(disco);
+        
+        CacheConfiguration ccfg = defaultCacheConfiguration();
+        
+//        ccfg.setStatisticsEnabled(true);
+        
+        cfg.setCacheConfiguration(ccfg);
+        return cfg;
+    }
+
+
+
     /**
      * @throws Exception If failed.
      */


Mime
View raw message