[jboss-cvs] JBossAS SVN: r69711 - trunk/testsuite/src/main/org/jboss/test/profileservice/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 7 16:45:45 EST 2008


Author: scott.stark at jboss.org
Date: 2008-02-07 16:45:45 -0500 (Thu, 07 Feb 2008)
New Revision: 69711

Modified:
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
Use proper profile name and log more info about untested comp properties

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java	2008-02-07 21:45:07 UTC (rev 69710)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java	2008-02-07 21:45:45 UTC (rev 69711)
@@ -45,7 +45,7 @@
  * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
  * @version <tt>$Revision: $</tt>
  */
-public class AbstractProfileServiceTest
+public abstract class AbstractProfileServiceTest
    extends JBossTestCase
 {
    protected ManagementView activeView;
@@ -55,6 +55,10 @@
    {
       super(name);
    }
+   /**
+    * @return the ProfileKey.name to use when loading the profile
+    */
+   protected abstract String getProfileName();
 
    protected void removeDeployment(String deployment)
       throws Exception
@@ -135,10 +139,11 @@
    {
       if( activeView == null )
       {
+         String profileName = getProfileName();
          InitialContext ctx = getInitialContext();
          ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
          activeView = ps.getViewManager();
-         ProfileKey defaultKey = new ProfileKey("default");
+         ProfileKey defaultKey = new ProfileKey(profileName);
          activeView.loadProfile(defaultKey);
          // Init the VFS to setup the vfs* protocol handlers
          VFS.init();

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2008-02-07 21:45:07 UTC (rev 69710)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2008-02-07 21:45:45 UTC (rev 69711)
@@ -81,4 +81,10 @@
    {
       removeDeployment("testCreateTopic-service.xml");
    }
+
+   @Override
+   protected String getProfileName()
+   {
+      return "profileservice";
+   }
 }

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2008-02-07 21:45:07 UTC (rev 69710)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2008-02-07 21:45:45 UTC (rev 69711)
@@ -63,9 +63,6 @@
  */
 public class ProfileServiceUnitTestCase extends AbstractProfileServiceTest
 {
-   private Type mapType;
-   private Type mapOfMapsType;
-
    /**
     * We need to define the order in which tests runs
     * @return
@@ -191,6 +188,7 @@
       try
       {
          mgtView.loadProfile(badKey);
+         fail("Did not see NoSuchProfileException");
       }
       catch(NoSuchProfileException e)
       {
@@ -563,6 +561,12 @@
 
    // Private and protected
 
+   @Override
+   protected String getProfileName()
+   {
+      return "profileservice";
+   }
+
    private void addNonXaDsProperties(Map<String, Serializable> propValues,
                                      String jndiName,
                                      String rarName,
@@ -662,6 +666,7 @@
       for(String propName : propValues.keySet())
       {
          ManagedProperty prop = dsMC.getProperty(propName);
+         log.debug("Checking: "+prop);
          assertNotNull(prop);
          Object propValue = prop.getValue();
          Object expectedValue = propValues.get(propName);
@@ -672,10 +677,6 @@
                assertEquals(prop.getName(), expectedValue, ((SimpleValue)propValue).getValue());
             else
             {
-/*
-               propValue = getMetaValueFactory().unwrap((MetaValue)propValue, valueType);
-               expectedValue = getMetaValueFactory().unwrap((MetaValue)expectedValue, valueType);
-*/
                // Compare the MetaValues
                assertEquals(prop.getName(), expectedValue, propValue);
             }
@@ -689,6 +690,11 @@
       if(!mcPropNames.isEmpty())
       {
          log.warn(getName() + "> untested properties: " + mcPropNames);
+         for(String propName : mcPropNames)
+         {
+            ManagedProperty prop = dsMC.getProperty(propName);
+            log.info(prop);
+         }
       }
    }
 
@@ -706,8 +712,4 @@
       return metaValue;
    }
 
-   public Map<String, Map<String, String>> mapOfMaps()
-   {
-      return null;
-   }
 }




More information about the jboss-cvs-commits mailing list