cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1410440 - /cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/CXFBusImplTest.java
Date Fri, 16 Nov 2012 16:32:10 GMT
Author: dkulp
Date: Fri Nov 16 16:32:09 2012
New Revision: 1410440

URL: http://svn.apache.org/viewvc?rev=1410440&view=rev
Log:
Fix potential test failure if bus.hashCode() < 0

Modified:
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/CXFBusImplTest.java

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/CXFBusImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/CXFBusImplTest.java?rev=1410440&r1=1410439&r2=1410440&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/CXFBusImplTest.java (original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/CXFBusImplTest.java Fri Nov 16 16:32:09
2012
@@ -94,9 +94,9 @@ public class CXFBusImplTest extends Asse
     public void testBusID() {
         CXFBusImpl bus = new CXFBusImpl();
         String id = bus.getId();
-        assertEquals("The bus id should be cxf", id, Bus.DEFAULT_BUS_ID + bus.hashCode());
+        assertEquals("The bus id should be cxf", id, Bus.DEFAULT_BUS_ID + Math.abs(bus.hashCode()));
         bus.setId("test");
-        assertEquals("The bus id should be changed", bus.getId(), "test");
+        assertEquals("The bus id should be changed", "test", bus.getId());
     }
     
     @Test



Mime
View raw message