tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1023161 - in /openejb/trunk/openejb3: ./ container/openejb-core/src/test/java/org/apache/openejb/config/ container/openejb-core/src/test/java/org/apache/openejb/core/stateless/ examples/alternate-descriptors/src/main/resources/META-INF/
Date Sat, 16 Oct 2010 00:28:58 GMT
Author: dblevins
Date: Sat Oct 16 00:28:57 2010
New Revision: 1023161

URL: http://svn.apache.org/viewvc?rev=1023161&view=rev
Log:
svn merge -r 1023095:1023096 https://svn.apache.org/repos/asf/openejb/branches/openejb-3.1.x

http://svn.apache.org/viewvc?view=revision&revision=1023096
------------------------------------------------------------------------
r1023096 | dblevins | 2010-10-15 13:15:31 -0700 (Fri, 15 Oct 2010) | 1 line

Added assertEquals for lists and maps so we can more easily see what doesn't compare
------------------------------------------------------------------------

Modified:
    openejb/trunk/openejb3/   (props changed)
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java
  (props changed)
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
    openejb/trunk/openejb3/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml
  (props changed)

Propchange: openejb/trunk/openejb3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 16 00:28:57 2010
@@ -1,3 +1,3 @@
 /openejb/branches/openejb-3.1.1:779593
-/openejb/branches/openejb-3.1.x:945409,945448,1004381,1005322,1021880,1021903,1021955,1021961,1021965,1021975,1021979,1021990,1022375,1022393
+/openejb/branches/openejb-3.1.x:945409,945448,1004381,1005322,1021880,1021903,1021955,1021961,1021965,1021975,1021979,1021990,1022375,1022393,1023096
 /openejb/branches/openejb-jcdi:984659-985270

Propchange: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 16 00:28:57 2010
@@ -1,3 +1,3 @@
 /openejb/branches/openejb-3.1.1/container/openejb-core/src/test/java/org/apache/openejb/config/UberInterfaceTest.java:779593
-/openejb/branches/openejb-3.1.x/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java:945409,945448,1005322,1021880,1021903,1021955,1021961,1021965,1021975,1021979,1021990,1022375,1022393
+/openejb/branches/openejb-3.1.x/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java:945409,945448,1005322,1021880,1021903,1021955,1021961,1021965,1021975,1021979,1021990,1022375,1022393,1023096
 /openejb/branches/openejb-jcdi/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java:984659-985270

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java?rev=1023161&r1=1023160&r2=1023161&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
Sat Oct 16 00:28:57 2010
@@ -50,6 +50,7 @@ import java.lang.management.ManagementFa
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -175,7 +176,31 @@ public class StatelessPoolStatsTest exte
         List<MBeanOperationInfo> actualOperations = new ArrayList<MBeanOperationInfo>();
         actualOperations.addAll(Arrays.asList(poolMBeanInfo.getOperations()));
         assertEquals(expectedOperations, actualOperations);
+    }
+
+    public static void assertEquals(List<?> expectedList, List<?> actualList)
{
+        final Iterator<?> expected = expectedList.iterator();
+        final Iterator<?> actual = actualList.iterator();
+
+        while(expected.hasNext() && actual.hasNext()) {
+            assertEquals(expected.next(), actual.next());
+        }
+
+        assertEquals(expected.hasNext(), actual.hasNext());
+    }
+
+    public static void assertEquals(Map<?,?> expectedMap, Map<?,?> actualMap)
{
+        final Iterator<? extends Map.Entry<?, ?>> expectedIt = expectedMap.entrySet().iterator();
+        final Iterator<? extends Map.Entry<?, ?>> actualIt = actualMap.entrySet().iterator();
+
+        while (expectedIt.hasNext() && actualIt.hasNext()) {
+            final Map.Entry<?, ?> expected = expectedIt.next();
+            final Map.Entry<?, ?> actual = actualIt.next();
+            assertEquals("key", expected.getKey(), actual.getKey());
+            assertEquals(expected.getKey().toString(), expected.getValue(), actual.getValue());
+        }
 
+        assertEquals(expectedIt.hasNext(), actualIt.hasNext());
     }
 
     /**

Propchange: openejb/trunk/openejb3/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 16 00:28:57 2010
@@ -1,3 +1,3 @@
 /openejb/branches/openejb-3.1.1/examples/alternate-descriptors/src/main/resources/META-INF/ejb-jar.xml:779593
-/openejb/branches/openejb-3.1.x/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml:945409,945448,1005322,1021880,1021903,1021955,1021961,1021965,1021975,1021979,1021990,1022375,1022393
+/openejb/branches/openejb-3.1.x/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml:945409,945448,1005322,1021880,1021903,1021955,1021961,1021965,1021975,1021979,1021990,1022375,1022393,1023096
 /openejb/branches/openejb-jcdi/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml:984659-985270



Mime
View raw message