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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Apr 5 05:44:20 EDT 2009


Author: emuckenhuber
Date: 2009-04-05 05:44:19 -0400 (Sun, 05 Apr 2009)
New Revision: 86809

Modified:
   trunk/testsuite/src/main/org/jboss/test/profileservice/template/test/AbstractTemplateTest.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/template/test/DSDeploymentTemplateUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java
Log:
update deploy and template test cases

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/template/test/AbstractTemplateTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/template/test/AbstractTemplateTest.java	2009-04-05 09:35:43 UTC (rev 86808)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/template/test/AbstractTemplateTest.java	2009-04-05 09:44:19 UTC (rev 86809)
@@ -23,6 +23,8 @@
 
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 
 import org.jboss.beans.info.spi.PropertyInfo;
@@ -90,6 +92,11 @@
 
    abstract DeploymentTemplateInfo createDeploymentInfo(String name, Class<?> clazz) throws Exception;
    
+   protected Collection<String> getExcludes()
+   {
+      return Collections.emptySet();
+   }
+   
    protected DeploymentTemplateInfo assertTemplate(String name, Class<?> clazz) throws Exception
    {
       DeploymentTemplateInfo info = createDeploymentInfo(name, clazz);
@@ -111,11 +118,13 @@
       {
          //
          String propertyName = property.getName();
+
+         // exclude
+         if(getExcludes().contains(propertyName))
+            continue;
          //
          ManagedProperty other = mo.getProperty(propertyName);
          assertProperty(propertyName , property, other);
-         //
-         processed.add(propertyName);
          
          log.debug("property: " + propertyName);
          
@@ -127,6 +136,10 @@
          if(processed.contains(otherName))
             continue;
          
+         // exclude
+         if(getExcludes().contains(otherName))
+            continue;
+         
          ManagedProperty reference = mo.getProperty(otherName);
          if(isDebug() && reference == null)
          {
@@ -158,8 +171,7 @@
             log.error("includeInTemplate == true " + otherName);
             continue;
          }
-            
-         
+
          assertTrue(otherName + " includeInTemplate", annotation.includeInTemplate());
          assertProperty(otherName, other, reference);
       }      

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/template/test/DSDeploymentTemplateUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/template/test/DSDeploymentTemplateUnitTestCase.java	2009-04-05 09:35:43 UTC (rev 86808)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/template/test/DSDeploymentTemplateUnitTestCase.java	2009-04-05 09:44:19 UTC (rev 86809)
@@ -21,6 +21,9 @@
  */ 
 package org.jboss.test.profileservice.template.test;
 
+import java.util.Collection;
+import java.util.Collections;
+
 import org.jboss.managed.api.DeploymentTemplateInfo;
 import org.jboss.resource.deployers.management.DsDataSourceTemplateInfo;
 import org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData;
@@ -45,6 +48,12 @@
       return debug;
    }
    
+   @Override
+   protected Collection<String> getExcludes()
+   {
+      return Collections.singleton("dsType");
+   }
+   
    public void testLocalTxDataSourceTemplateInfo() throws Exception
    {
       assertTemplate("LocalTxDataSourceTemplateInfo",

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java	2009-04-05 09:35:43 UTC (rev 86808)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java	2009-04-05 09:44:19 UTC (rev 86809)
@@ -113,7 +113,7 @@
          {
             status = progress.getDeploymentStatus();
             assertTrue("DeploymentStatus.isCompleted: " + status, status.isCompleted());
-            assertTrue("DeploymentStatus.isRunning: " + status, status.isRunning());
+            assertFalse("DeploymentStatus.isRunning: " + status, status.isRunning());
             assertFalse("DeploymentStatus.isFailed: " + status, status.isFailed());
             // Check for a
             ManagementView mgtView = getManagementView();




More information about the jboss-cvs-commits mailing list