You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pl...@apache.org on 2016/05/27 01:34:25 UTC
directory-kerby git commit: DIRKRB-575 SaslAppTest failure due to
input having nothing to do with test. Contributed by Gerard Gagliano.
Repository: directory-kerby
Updated Branches:
refs/heads/trunk 19d72ebb8 -> ae26c10e5
DIRKRB-575 SaslAppTest failure due to input having nothing to do with test. Contributed by Gerard Gagliano.
Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/ae26c10e
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/ae26c10e
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/ae26c10e
Branch: refs/heads/trunk
Commit: ae26c10e52a6a92b1233f31308f848dbf53b71da
Parents: 19d72eb
Author: plusplusjiajia <ji...@intel.com>
Authored: Fri May 27 09:39:50 2016 +0800
Committer: plusplusjiajia <ji...@intel.com>
Committed: Fri May 27 09:39:50 2016 +0800
----------------------------------------------------------------------
.../kerby/kerberos/kerb/server/KdcTestBase.java | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/ae26c10e/kerby-kerb/kerb-kdc-test/src/test/java/org/apache/kerby/kerberos/kerb/server/KdcTestBase.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-kdc-test/src/test/java/org/apache/kerby/kerberos/kerb/server/KdcTestBase.java b/kerby-kerb/kerb-kdc-test/src/test/java/org/apache/kerby/kerberos/kerb/server/KdcTestBase.java
index 9e8424f..c4a87be 100644
--- a/kerby-kerb/kerb-kdc-test/src/test/java/org/apache/kerby/kerberos/kerb/server/KdcTestBase.java
+++ b/kerby-kerb/kerb-kdc-test/src/test/java/org/apache/kerby/kerberos/kerb/server/KdcTestBase.java
@@ -30,21 +30,32 @@ import org.junit.BeforeClass;
import java.io.File;
import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
public abstract class KdcTestBase {
private static File testDir;
private final String clientPassword = "123456";
- private final String hostname = "localhost";
+ private String hostname;
private final String clientPrincipalName = "drankye";
private final String clientPrincipal =
clientPrincipalName + "@" + TestKdcServer.KDC_REALM;
private final String serverPrincipalName = "test-service";
- private final String serverPrincipal =
- serverPrincipalName + "/" + hostname + "@" + TestKdcServer.KDC_REALM;
+ private final String serverPrincipal;
private SimpleKdcServer kdcServer;
+ public KdcTestBase() {
+ try {
+ hostname = InetAddress.getByName("127.0.0.1").getHostName();
+ } catch (UnknownHostException e) {
+ hostname = "localhost";
+ }
+ serverPrincipal =
+ serverPrincipalName + "/" + hostname + "@" + TestKdcServer.KDC_REALM;
+ }
+
@BeforeClass
public static void createTestDir() throws IOException {
String basedir = System.getProperty("basedir");