From 048aff2f682cffcc47eeea94c96359044c91a6ac Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Wed, 30 Mar 2005 02:27:34 +0000 Subject: [PATCH] Use hostname reported by server. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2472 b35dd754-fafc-0310-a699-88a17e54d16e --- test/org/jivesoftware/smack/test/SmackTestCase.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/org/jivesoftware/smack/test/SmackTestCase.java b/test/org/jivesoftware/smack/test/SmackTestCase.java index 511603759..9cb55b9f4 100644 --- a/test/org/jivesoftware/smack/test/SmackTestCase.java +++ b/test/org/jivesoftware/smack/test/SmackTestCase.java @@ -217,6 +217,10 @@ public abstract class SmackTestCase extends TestCase { connections[i] = new XMPPConnection(host, port, getSocketFactory()); } } + // Use the host name that the server reports. This is a good idea in most + // cases, but could fail if the user set a hostname in their XMPP server + // that will not resolve as a network connection. + host = connections[0].getHost(); // Create the test accounts if (!getConnection(0).getAccountManager().supportsAccountCreation()) fail("Server does not support account creation");