[jboss-cvs] JBossAS SVN: r73746 - in trunk/testsuite: src/main/org/jboss/test/aop/test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 28 10:26:13 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-05-28 10:26:13 -0400 (Wed, 28 May 2008)
New Revision: 73746

Modified:
   trunk/testsuite/build.xml
   trunk/testsuite/src/main/org/jboss/test/aop/test/ProxyCacheTestCase.java
Log:
[JBAS-5505] Test that class and container proxies are not cached across depoyments

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2008-05-28 14:25:31 UTC (rev 73745)
+++ trunk/testsuite/build.xml	2008-05-28 14:26:13 UTC (rev 73746)
@@ -834,8 +834,6 @@
    <!-- Tests that are currently broken -->
    <patternset id="badtest.excludes">
       <exclude name="org/jboss/test/aop/test/RemotingUnitTestCase"/>
-   	<exclude name="org/jboss/test/aop/test/MicrocontainerJMXUnitTestCase"/>
-   	<exclude name="org/jboss/test/aop/test/ProxyCacheTestCase"/>
    	        
       <!-- Needs apache ? -->
       <exclude name="org/jboss/test/cluster/httpsessionreplication/**" />

Modified: trunk/testsuite/src/main/org/jboss/test/aop/test/ProxyCacheTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/test/ProxyCacheTestCase.java	2008-05-28 14:25:31 UTC (rev 73745)
+++ trunk/testsuite/src/main/org/jboss/test/aop/test/ProxyCacheTestCase.java	2008-05-28 14:26:13 UTC (rev 73746)
@@ -22,8 +22,10 @@
 package org.jboss.test.aop.test;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
@@ -63,52 +65,50 @@
    public void testBootStrapContainerProxy() throws Exception
    {
       Scenario scenario = new Scenario() {
-      int last = 0;
-
-      public void execute() throws Exception
-      {
-         deploy(GLOBAL_JAR);
-         try
+         
+         Set<Integer> done = new HashSet<Integer>();
+   
+         public void execute() throws Exception
          {
-            
-            int id = createContainerProxy(GLOBAL, ArrayList.class.getName(), null);
-            if (last != 0)
+            deploy(GLOBAL_JAR);
+            try
             {
-               assertEquals(last, id);
+               
+               int id = createContainerProxy(GLOBAL, ArrayList.class.getName(), null);
+               assertFalse(done.contains(id));
+               done.add(id);
             }
-            last = id;
+            finally
+            {
+               undeploy(GLOBAL_JAR);
+            }
          }
-         finally
-         {
-            undeploy(GLOBAL_JAR);
-         }
-      }};
+      };
       executeScenario(scenario);
    }
    
    public void testBootStrapClassContainerProxy() throws Exception
    {
       Scenario scenario = new Scenario() {
-      int last = 0;
 
-      public void execute() throws Exception
-      {
-         deploy(GLOBAL_JAR);
-         try
+         Set<Integer> done = new HashSet<Integer>();
+   
+         public void execute() throws Exception
          {
-            
-            int id = createClassProxy(GLOBAL, ArrayList.class.getName(), null);
-            if (last != 0)
+            deploy(GLOBAL_JAR);
+            try
             {
-               assertEquals(last, id);
+               
+               int id = createClassProxy(GLOBAL, ArrayList.class.getName(), null);
+               assertFalse(done.contains(id));
+               done.add(id);
             }
-            last = id;
+            finally
+            {
+               undeploy(GLOBAL_JAR);
+            }
          }
-         finally
-         {
-            undeploy(GLOBAL_JAR);
-         }
-      }};
+      };
       executeScenario(scenario);
    }
    




More information about the jboss-cvs-commits mailing list