directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [07/50] [abbrv] directory-kerby git commit: Fix kdc can't set backend in unit tests.
Date Fri, 21 Jul 2017 11:26:54 GMT
Fix kdc can't set backend in unit tests.


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/2dde1f7b
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/2dde1f7b
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/2dde1f7b

Branch: refs/heads/gssapi
Commit: 2dde1f7b30300759c4daad9a1d0939127aa85017
Parents: d309a01
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Fri Apr 22 11:00:00 2016 +0800
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jul 21 12:25:02 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java  | 2 +-
 .../java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java  | 2 +-
 .../org/apache/kerby/kerberos/kdc/ZookeeperBackendKdcTest.java  | 4 ++--
 .../kerby/kerberos/kerb/integration/test/SaslAppTest.java       | 5 ++---
 4 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2dde1f7b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
----------------------------------------------------------------------
diff --git a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
index 1292aa9..9247e3e 100644
--- a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
+++ b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
@@ -33,7 +33,6 @@ public class JsonBackendKdcTest extends KerbyKdcTest {
 
     @Override
     protected void prepareKdc() throws KrbException {
-        super.prepareKdc();
 
         File testDir = new File(System.getProperty("test.dir", "target"));
         jsonBackendFile = new File(testDir, "json-backend-file");
@@ -44,6 +43,7 @@ public class JsonBackendKdcTest extends KerbyKdcTest {
                 JsonIdentityBackend.JSON_IDENTITY_BACKEND_DIR, jsonBackendFileString);
         backendConfig.setString(KdcConfigKey.KDC_IDENTITY_BACKEND,
             "org.apache.kerby.kerberos.kdc.identitybackend.JsonIdentityBackend");
+        super.prepareKdc();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2dde1f7b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
----------------------------------------------------------------------
diff --git a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
index b367c5a..d3f20ae 100644
--- a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
+++ b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
@@ -87,7 +87,6 @@ public class LdapBackendKdcTest extends AbstractLdapBackendKdcTest {
 
     @Override
     protected void prepareKdc() throws KrbException {
-        super.prepareKdc();
         BackendConfig backendConfig = getKdcServer().getBackendConfig();
         backendConfig.setString("host", "localhost");
         backendConfig.setString("admin_dn", ADMIN_DN);
@@ -96,6 +95,7 @@ public class LdapBackendKdcTest extends AbstractLdapBackendKdcTest {
         backendConfig.setInt("port", getLdapServer().getPort());
         backendConfig.setString(KdcConfigKey.KDC_IDENTITY_BACKEND,
                 "org.apache.kerby.kerberos.kdc.identitybackend.LdapIdentityBackend");
+        super.prepareKdc();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2dde1f7b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/ZookeeperBackendKdcTest.java
----------------------------------------------------------------------
diff --git a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/ZookeeperBackendKdcTest.java
b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/ZookeeperBackendKdcTest.java
index f7d1251..bface94 100644
--- a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/ZookeeperBackendKdcTest.java
+++ b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/ZookeeperBackendKdcTest.java
@@ -49,8 +49,6 @@ public class ZookeeperBackendKdcTest extends KerbyKdcTest {
 
     @Override
     protected void prepareKdc() throws KrbException {
-        super.prepareKdc();
-
         BackendConfig backendConfig = getKdcServer().getBackendConfig();
 
         File testDir = new File(System.getProperty("test.dir", "target"));
@@ -64,6 +62,8 @@ public class ZookeeperBackendKdcTest extends KerbyKdcTest {
         backendConfig.setString(ZKConfKey.DATA_LOG_DIR.getPropertyKey(), dataLogDir.getAbsolutePath());
         backendConfig.setString(KdcConfigKey.KDC_IDENTITY_BACKEND,
             "org.apache.kerby.kerberos.kdc.identitybackend.ZookeeperIdentityBackend");
+
+        super.prepareKdc();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2dde1f7b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/SaslAppTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/SaslAppTest.java
b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/SaslAppTest.java
index 68d34cd..e7e6dba 100644
--- a/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/SaslAppTest.java
+++ b/kerby-kerb/integration-test/src/test/java/org/apache/kerby/kerberos/kerb/integration/test/SaslAppTest.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.integration.test;
 
 import org.apache.kerby.kerberos.kerb.integration.test.sasl.SaslAppClient;
 import org.apache.kerby.kerberos.kerb.integration.test.sasl.SaslAppServer;
+import org.junit.Test;
 
 public class SaslAppTest extends AppTest {
 
@@ -43,9 +44,7 @@ public class SaslAppTest extends AppTest {
         });
     }
 
-    @SuppressWarnings("PMD")
-    //@Test
-    //TODO: not robust enough, with "ICMP Port Unreachable" exception.
+    @Test
     public void test() throws Exception {
         runAppClient();
     }


Mime
View raw message