ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] Jokser commented on a change in pull request #6799: IGNITE-11094 Add SSL support for ignite zookeeper SPI
Date Thu, 12 Sep 2019 12:36:07 GMT
Jokser commented on a change in pull request #6799: IGNITE-11094 Add SSL support for ignite
zookeeper SPI
URL: https://github.com/apache/ignite/pull/6799#discussion_r323714398
 
 

 ##########
 File path: modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSslTestBase.java
 ##########
 @@ -0,0 +1,70 @@
+/*
+ * 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.zk.internal;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi;
+
+/**
+ * Base class for Zookeeper SPI discovery tests in this package. It is intended to provide
common overrides for
+ * superclass methods to be shared by all subclasses.
+ */
+class ZookeeperDiscoverySpiSslTestBase extends ZookeeperDiscoverySpiTestBase {
+    /** */
+    protected boolean sslEnabled;
+
+    /** {@inheritDoc} */
+    @Override protected Map<String, Object>[] clusterCustomProperties() {
+        Map<String, Object>[] customProps = super.clusterCustomProperties();
+
+        for (int i = 0; i < ZK_SRVS; i++) {
+            Map<String, Object> props = customProps[i];
+
+            if (props == null)
+                props = new HashMap<>();
+
+            props.put(ZK_SECURE_CLIENT_PORT, String.valueOf(2281 + i));
+
+            customProps[i] = props;
+        }
+
+        return customProps;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void setupZkConnectionString(ZookeeperDiscoverySpi zkSpi) {
 
 Review comment:
   I think you shouldn't copy-paste whole logic regarding to setting up ZK connection string.
   You should abstract the only place returning connection string setting to zkSpi.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message