[jboss-cvs] JBossAS SVN: r83729 - branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 31 13:43:25 EST 2009


Author: pferraro
Date: 2009-01-31 13:43:25 -0500 (Sat, 31 Jan 2009)
New Revision: 83729

Modified:
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/PreferredMasterElectionPolicyUnitTestCase.java
Log:
InetAddress.getLocalHost() and InetAddress.getByName("localhost") are not equivalent.  Use the latter.

Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/PreferredMasterElectionPolicyUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/PreferredMasterElectionPolicyUnitTestCase.java	2009-01-31 17:14:46 UTC (rev 83728)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/PreferredMasterElectionPolicyUnitTestCase.java	2009-01-31 18:43:25 UTC (rev 83729)
@@ -52,7 +52,7 @@
    @Override
    protected void setUp() throws UnknownHostException
    {
-      InetAddress localAddress = InetAddress.getLocalHost();
+      InetAddress localAddress = InetAddress.getByName("localhost");
       
       this.candidates.add(new ClusterNodeImpl(new IpAddress(localAddress, 10000)));
       this.candidates.add(new ClusterNodeImpl(new IpAddress(localAddress, 10001)));
@@ -167,7 +167,7 @@
       {
          this.policy.setPreferredMaster("onceuponatimeinalandfarfarawaylivedamancalledgalder:1199");
          
-         Assert.fail("IllegalArgumentException expected");
+         Assert.fail(this.policy.getPreferredMaster());
       }
       catch (IllegalArgumentException e)
       {




More information about the jboss-cvs-commits mailing list