Author: berndf
Date: Tue Oct  7 12:56:31 2008
New Revision: 702608

URL: http://svn.apache.org/viewvc?rev=702608&view=rev
Log:
provide better diagnostics if DNS resolution fails - completed.

Modified:
    
james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java

Modified: 
james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java?rev=702608&r1=702607&r2=702608&view=diff
==============================================================================
--- 
james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
 (original)
+++ 
james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
 Tue Oct  7 12:56:31 2008
@@ -434,7 +434,11 @@
         m_testConfiguration.setReverseEqualsHelo();
         m_testConfiguration.setAuthorizedAddresses("192.168.0.1");
         // temporary alter the loopback resolution
-        
m_dnsServer.setLocalhostByName(InetAddress.getByName("james.apache.org"));
+        try {
+            
m_dnsServer.setLocalhostByName(InetAddress.getByName("james.apache.org"));
+        } catch (UnknownHostException e) {
+            fail("james.apache.org currently cannot be resolved (check your 
DNS/internet connection/proxy settings to make test pass)");
+        }
         try {
             finishSetUp(m_testConfiguration);
     
@@ -659,7 +663,13 @@
         m_testConfiguration.setReverseEqualsEhlo();
         m_testConfiguration.setAuthorizedAddresses("192.168.0.1");
         // temporary alter the loopback resolution
-        
m_dnsServer.setLocalhostByName(m_dnsServer.getByName("james.apache.org"));
+        InetAddress jamesDomain = null;
+        try {
+            jamesDomain = m_dnsServer.getByName("james.apache.org");
+        } catch (UnknownHostException e) {
+            fail("james.apache.org currently cannot be resolved (check your 
DNS/internet connection/proxy settings to make test pass)");
+        }
+        m_dnsServer.setLocalhostByName(jamesDomain);
         try {
             finishSetUp(m_testConfiguration);
     



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to