You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by co...@apache.org on 2017/07/21 11:26:50 UTC
[03/50] [abbrv] directory-kerby git commit: DIRKRB-575 SaslAppTest
failure due to input having nothing to do with test. Contributed by Gerard
Gagliano.
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/1877087b
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/1877087b
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/1877087b
Branch: refs/heads/gssapi
Commit: 1877087b96bd7d3448b5420ace57c6105d509ad6
Parents: 9210235
Author: plusplusjiajia <ji...@intel.com>
Authored: Fri May 27 09:39:50 2016 +0800
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Jul 21 12:25:02 2017 +0100
----------------------------------------------------------------------
.../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/1877087b/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");