knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [knox] branch master updated: KNOX-2121 - Zookeeper - Reduce amount of resources required to run tests (#190)
Date Tue, 12 Nov 2019 03:46:00 GMT
This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f7d633  KNOX-2121 - Zookeeper - Reduce amount of resources required to run tests
(#190)
6f7d633 is described below

commit 6f7d633b1bfc62fdd6f2203348d65afebbf6771a
Author: Kevin Risden <risdenk@users.noreply.github.com>
AuthorDate: Mon Nov 11 22:45:50 2019 -0500

    KNOX-2121 - Zookeeper - Reduce amount of resources required to run tests (#190)
    
    Our Zookeeper tests don't require 3 instances
    for them to run. We can instead use 1 instance
    and run the tests with fewer resources.
    
    The timeout for cluster starting up is determined
    by hostname lookup speed and can't easily be changed.
    
    https://github.com/apache/curator/blob/master/curator-test/src/main/java/org/apache/curator/test/TestingZooKeeperMain.java#L74
    
    Signed-off-by: Kevin Risden <krisden@apache.org>
---
 .../knox/gateway/ha/provider/impl/AtlasZookeeperURLManagerTest.java     | 2 +-
 .../knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java     | 2 +-
 .../knox/gateway/ha/provider/impl/HS2ZookeeperURLManagerTest.java       | 2 +-
 .../knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java     | 2 +-
 .../knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java      | 2 +-
 .../gateway/services/security/impl/ZookeeperRemoteAliasMonitorTest.java | 2 +-
 .../gateway/services/security/impl/ZookeeperRemoteAliasServiceTest.java | 2 +-
 .../gateway/topology/monitor/ZooKeeperConfigurationMonitorTest.java     | 2 +-
 .../config/remote/zk/RemoteConfigurationRegistryClientServiceTest.java  | 2 +-
 .../knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java   | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManagerTest.java
b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManagerTest.java
index 2ee6cad..5ec36b2 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManagerTest.java
@@ -47,7 +47,7 @@ public class AtlasZookeeperURLManagerTest {
 
     @Before
     public void setUp() throws Exception {
-        cluster = new TestingCluster(3);
+        cluster = new TestingCluster(1);
         cluster.start();
 
         try(CuratorFramework zooKeeperClient =
diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java
b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java
index c35f5b6..30ae5ba 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java
@@ -49,7 +49,7 @@ public class HBaseZookeeperURLManagerTest {
 
   @Before
   public void setUp() throws Exception {
-    cluster = new TestingCluster(3);
+    cluster = new TestingCluster(1);
     cluster.start();
   }
 
diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HS2ZookeeperURLManagerTest.java
b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HS2ZookeeperURLManagerTest.java
index 2500e4b..00b736f 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HS2ZookeeperURLManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HS2ZookeeperURLManagerTest.java
@@ -43,7 +43,7 @@ public class HS2ZookeeperURLManagerTest {
 
   @Before
   public void setUp() throws Exception {
-    cluster = new TestingCluster(3);
+    cluster = new TestingCluster(1);
     cluster.start();
 
     try(CuratorFramework zooKeeperClient =
diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java
b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java
index 50a0f7d..3b198fe 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java
@@ -44,7 +44,7 @@ public class KafkaZookeeperURLManagerTest {
 
   @Before
   public void setUp() throws Exception {
-    cluster = new TestingCluster(3);
+    cluster = new TestingCluster(1);
     cluster.start();
 
     try (CuratorFramework zooKeeperClient = CuratorFrameworkFactory.builder()
diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java
b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java
index 2e7e476..2afd19f 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java
@@ -48,7 +48,7 @@ public class SOLRZookeeperURLManagerTest {
 
   @Before
   public void setUp() throws Exception {
-    cluster = new TestingCluster(3);
+    cluster = new TestingCluster(1);
     cluster.start();
 
     try(CuratorFramework zooKeeperClient =
diff --git a/gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasMonitorTest.java
b/gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasMonitorTest.java
index f4799a8..7b190da 100644
--- a/gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasMonitorTest.java
+++ b/gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasMonitorTest.java
@@ -78,7 +78,7 @@ public class ZookeeperRemoteAliasMonitorTest {
 
     // Define the test cluster
     List<InstanceSpec> instanceSpecs = new ArrayList<>();
-    for (int i = 0; i < 3; i++) {
+    for (int i = 0; i < 1; i++) {
       InstanceSpec is = new InstanceSpec(null, -1, -1, -1, false, (i + 1), -1,
           -1, customInstanceSpecProps);
       instanceSpecs.add(is);
diff --git a/gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasServiceTest.java
b/gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasServiceTest.java
index 2e87173..aeb6b1e 100644
--- a/gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasServiceTest.java
+++ b/gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasServiceTest.java
@@ -88,7 +88,7 @@ public class ZookeeperRemoteAliasServiceTest {
 
     // Define the test cluster
     List<InstanceSpec> instanceSpecs = new ArrayList<>();
-    for (int i = 0; i < 3; i++) {
+    for (int i = 0; i < 1; i++) {
       InstanceSpec is = new InstanceSpec(null, -1, -1, -1, false, (i + 1), -1,
           -1, customInstanceSpecProps);
       instanceSpecs.add(is);
diff --git a/gateway-server/src/test/java/org/apache/knox/gateway/topology/monitor/ZooKeeperConfigurationMonitorTest.java
b/gateway-server/src/test/java/org/apache/knox/gateway/topology/monitor/ZooKeeperConfigurationMonitorTest.java
index 4b3b5fb..a72c1f0 100644
--- a/gateway-server/src/test/java/org/apache/knox/gateway/topology/monitor/ZooKeeperConfigurationMonitorTest.java
+++ b/gateway-server/src/test/java/org/apache/knox/gateway/topology/monitor/ZooKeeperConfigurationMonitorTest.java
@@ -93,7 +93,7 @@ public class ZooKeeperConfigurationMonitorTest {
 
         // Define the test cluster
         List<InstanceSpec> instanceSpecs = new ArrayList<>();
-        for (int i = 0 ; i < 3 ; i++) {
+        for (int i = 0 ; i < 1 ; i++) {
             InstanceSpec is = new InstanceSpec(null, -1, -1, -1, false, (i+1), -1, -1, customInstanceSpecProps);
             instanceSpecs.add(is);
         }
diff --git a/gateway-service-remoteconfig/src/test/java/org/apache/knox/gateway/service/config/remote/zk/RemoteConfigurationRegistryClientServiceTest.java
b/gateway-service-remoteconfig/src/test/java/org/apache/knox/gateway/service/config/remote/zk/RemoteConfigurationRegistryClientServiceTest.java
index 29029ac..adaa26b 100644
--- a/gateway-service-remoteconfig/src/test/java/org/apache/knox/gateway/service/config/remote/zk/RemoteConfigurationRegistryClientServiceTest.java
+++ b/gateway-service-remoteconfig/src/test/java/org/apache/knox/gateway/service/config/remote/zk/RemoteConfigurationRegistryClientServiceTest.java
@@ -233,7 +233,7 @@ public class RemoteConfigurationRegistryClientServiceTest {
 
         // Define the test cluster
         List<InstanceSpec> instanceSpecs = new ArrayList<>();
-        for (int i = 0 ; i < 3 ; i++) {
+        for (int i = 0 ; i < 1 ; i++) {
             InstanceSpec is = new InstanceSpec(null, -1, -1, -1, false, (i+1), -1, -1, customInstanceSpecProps);
             instanceSpecs.add(is);
         }
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java
b/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java
index 1eda9f5..d8529c0 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java
@@ -163,7 +163,7 @@ public class RemoteConfigurationMonitorTest {
 
         // Define the test cluster
         List<InstanceSpec> instanceSpecs = new ArrayList<>();
-        for (int i = 0 ; i < 3 ; i++) {
+        for (int i = 0 ; i < 1 ; i++) {
             InstanceSpec is = new InstanceSpec(null, -1, -1, -1, false, (i+1), -1, -1, customInstanceSpecProps);
             instanceSpecs.add(is);
         }


Mime
View raw message