openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1468230 - in /openwebbeans/trunk: webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/beans/ webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/ webbeans-impl/src/test/java/org/apache/web...
Date Mon, 15 Apr 2013 21:20:39 GMT
Author: struberg
Date: Mon Apr 15 21:20:39 2013
New Revision: 1468230

URL: http://svn.apache.org/r1468230
Log:
OWB-828 fix other tests as well

Modified:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/beans/DependentScopedBean.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/DependingInterceptorTest.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/MultiRequestProxyTest.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/ejb/EjbInterceptorTest.java
    openwebbeans/trunk/webbeans-web/src/test/java/org/apache/webbeans/web/tests/interceptor/CachedInterceptorHandlerTest.java

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/beans/DependentScopedBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/beans/DependentScopedBean.java?rev=1468230&r1=1468229&r2=1468230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/beans/DependentScopedBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/beans/DependentScopedBean.java
Mon Apr 15 21:20:39 2013
@@ -20,6 +20,7 @@ package org.apache.webbeans.newtests.int
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
+import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
 
 import org.apache.webbeans.newtests.interceptors.annotation.DependentInterceptorBindingType;

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/DependingInterceptorTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/DependingInterceptorTest.java?rev=1468230&r1=1468229&r2=1468230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/DependingInterceptorTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/DependingInterceptorTest.java
Mon Apr 15 21:20:39 2013
@@ -30,6 +30,7 @@ import junit.framework.Assert;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.newtests.interceptors.beans.ApplicationScopedBean;
+import org.apache.webbeans.newtests.interceptors.beans.DependentScopedBean;
 import org.apache.webbeans.newtests.interceptors.beans.RequestScopedBean;
 import org.apache.webbeans.newtests.interceptors.common.TransactionInterceptor;
 import org.junit.Test;
@@ -49,7 +50,8 @@ public class DependingInterceptorTest ex
         beanClasses.add(TransactionInterceptor.class);
         beanClasses.add(ApplicationScopedBean.class);
         beanClasses.add(RequestScopedBean.class);
-        
+        beanClasses.add(DependentScopedBean.class);
+
         TransactionInterceptor.count = 0;
         
         startContainer(beanClasses, beanXmls);       
@@ -74,7 +76,7 @@ public class DependingInterceptorTest ex
         RequestScopedBean realInstance1 = beanInstance1.getInstance();
         
         Assert.assertTrue(TransactionInterceptor.ECHO);
-        Assert.assertEquals(1, TransactionInterceptor.count);
+        Assert.assertEquals(2, TransactionInterceptor.count);
 
         TransactionInterceptor.ECHO = false;
 
@@ -94,7 +96,7 @@ public class DependingInterceptorTest ex
 
         Assert.assertTrue(TransactionInterceptor.ECHO);
 
-        Assert.assertEquals(2, TransactionInterceptor.count);
+        Assert.assertEquals(4, TransactionInterceptor.count);
         
         Assert.assertNotSame(realInstance1, realInstance2);
         Assert.assertEquals(realInstance1.getMyService().getJ(), realInstance2.getMyService().getJ());
@@ -112,7 +114,8 @@ public class DependingInterceptorTest ex
             Collection<Class<?>> beanClasses = new ArrayList<Class<?>>();
             beanClasses.add(TransactionInterceptor.class);
             beanClasses.add(ApplicationScopedBean.class);
-            
+            beanClasses.add(DependentScopedBean.class);
+
             TransactionInterceptor.count = 0;
             TransactionInterceptor.interceptorCount = 0;
             

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java?rev=1468230&r1=1468229&r2=1468230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java
Mon Apr 15 21:20:39 2013
@@ -23,6 +23,7 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.newtests.interceptors.beans.ApplicationScopedBean;
+import org.apache.webbeans.newtests.interceptors.beans.DependentScopedBean;
 import org.apache.webbeans.newtests.interceptors.beans.RequestScopedBean;
 import org.apache.webbeans.newtests.interceptors.common.TransactionInterceptor;
 import org.junit.Test;
@@ -60,6 +61,7 @@ public class InterceptorPerformanceTest 
         beanClasses.add(TransactionInterceptor.class);
         beanClasses.add(ApplicationScopedBean.class);
         beanClasses.add(RequestScopedBean.class);
+        beanClasses.add(DependentScopedBean.class);
 
         TransactionInterceptor.count = 0;
 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/MultiRequestProxyTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/MultiRequestProxyTest.java?rev=1468230&r1=1468229&r2=1468230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/MultiRequestProxyTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/MultiRequestProxyTest.java
Mon Apr 15 21:20:39 2013
@@ -49,18 +49,17 @@ public class MultiRequestProxyTest exten
 
         startContainer(beanClasses, beanXmls);
 
-        RequestScopedBean rb1 = getInstance("requestScopedBean");
-        Assert.assertNotNull(rb1);
-        Assert.assertNotNull(rb1.getInstance());
-
-        getLifecycle().getContextService().endContext(RequestScoped.class, null);
-
-        // and now the 2nd request
-        getLifecycle().getContextService().startContext(RequestScoped.class, null);
-
-        RequestScopedBean rb2 = getInstance("requestScopedBean");
-        Assert.assertNotNull(rb2);
-        Assert.assertNotNull(rb2.getInstance());
+        for (int i = 1; i < 100; i++)
+        {
+            RequestScopedBean rb1 = getInstance("requestScopedBean");
+            Assert.assertNotNull(rb1);
+            Assert.assertNotNull(rb1.getInstance());
+
+            getLifecycle().getContextService().endContext(RequestScoped.class, null);
+
+            // and now the 2nd request
+            getLifecycle().getContextService().startContext(RequestScoped.class, null);
+        }
 
         shutDownContainer();
         

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java?rev=1468230&r1=1468229&r2=1468230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/dependent/DependentInterceptorTest.java
Mon Apr 15 21:20:39 2013
@@ -51,7 +51,10 @@ public class DependentInterceptorTest ex
         Collection<Class<?>> beanClasses = new ArrayList<Class<?>>();
         beanClasses.add(DependentInterceptor.class);
         beanClasses.add(DependentScopedBean.class);
-        
+
+        DependentScopedBean.PRE_DESTROY = false;
+        DependentScopedBean.POST_CONSTRUCT = false;
+
         startContainer(beanClasses, beanXmls);        
         
         Set<Bean<?>> beans = getBeanManager().getBeans("org.apache.webbeans.newtests.interceptors.beans.DependentScopedBean");

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/ejb/EjbInterceptorTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/ejb/EjbInterceptorTest.java?rev=1468230&r1=1468229&r2=1468230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/ejb/EjbInterceptorTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/ejb/EjbInterceptorTest.java
Mon Apr 15 21:20:39 2013
@@ -25,6 +25,7 @@ import junit.framework.Assert;
 
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.newtests.interceptors.beans.ApplicationScopedBean;
+import org.apache.webbeans.newtests.interceptors.beans.DependentScopedBean;
 import org.apache.webbeans.newtests.interceptors.beans.RequestScopedBean;
 import org.junit.Test;
 
@@ -39,6 +40,7 @@ public class EjbInterceptorTest extends 
         beanClasses.add(RequestScopedBean.class);
         beanClasses.add(ManagedBeanWithEjbInterceptor.class);
         beanClasses.add(ApplicationScopedBean.class);
+        beanClasses.add(DependentScopedBean.class);
         beanClasses.add(EjbInterceptor.class);
         
         startContainer(beanClasses, beanXmls);        
@@ -61,6 +63,7 @@ public class EjbInterceptorTest extends 
         beanClasses.add(RequestScopedBean.class);
         beanClasses.add(ManagedBeanWithMethodEjbInterceptor.class);
         beanClasses.add(ApplicationScopedBean.class);
+        beanClasses.add(DependentScopedBean.class);
         beanClasses.add(EjbInterceptor.class);
 
         startContainer(beanClasses, beanXmls);

Modified: openwebbeans/trunk/webbeans-web/src/test/java/org/apache/webbeans/web/tests/interceptor/CachedInterceptorHandlerTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/test/java/org/apache/webbeans/web/tests/interceptor/CachedInterceptorHandlerTest.java?rev=1468230&r1=1468229&r2=1468230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/test/java/org/apache/webbeans/web/tests/interceptor/CachedInterceptorHandlerTest.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/test/java/org/apache/webbeans/web/tests/interceptor/CachedInterceptorHandlerTest.java
Mon Apr 15 21:20:39 2013
@@ -22,6 +22,7 @@ import junit.framework.Assert;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.newtests.interceptors.beans.ApplicationScopedBean;
+import org.apache.webbeans.newtests.interceptors.beans.DependentScopedBean;
 import org.apache.webbeans.newtests.interceptors.beans.RequestScopedBean;
 import org.apache.webbeans.newtests.interceptors.common.TransactionInterceptor;
 import org.apache.webbeans.web.tests.MockServletContext;
@@ -57,6 +58,7 @@ public class CachedInterceptorHandlerTes
         Collection<Class<?>> beanClasses = new ArrayList<Class<?>>();
         beanClasses.add(ApplicationScopedBean.class);
         beanClasses.add(RequestScopedBean.class);
+        beanClasses.add(DependentScopedBean.class);
 
         TransactionInterceptor.count = 0;
 



Mime
View raw message