[jboss-cvs] JBossAS SVN: r84955 - in trunk/testsuite/src/main/org/jboss/test: deployers and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 2 05:51:45 EST 2009
Author: emuckenhuber
Date: 2009-03-02 05:51:45 -0500 (Mon, 02 Mar 2009)
New Revision: 84955
Modified:
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeployUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ConnectionFactoryRestartUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/JmsDestinationRestartUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/PersistedDataSourceUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ConnectionFactoryOverrideTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/JmsDestinationOverrideTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ProfileServiceOverrideTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/ManagementViewUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/SecurityManagedObjectsTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServiceBindingManagedObjectsTestCase.java
Log:
[JBAS-6525] update tests to use the default profile defined by DeploymentManager to deploy applications
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeployUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeployUnitTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/profileservice/test/ClusteredDeployUnitTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -54,12 +54,6 @@
getLog().debug(eventInfo);
}
- @Override
- protected String getProfileName()
- {
- return "all";
- }
-
public void testWarDeployment()
throws Exception
{
Modified: trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -95,6 +95,9 @@
public static final String notSar1Deployment = "mbean1-not.asar";
public static final String notSar1DeploymentUnpacked = "unpacked-mbean1-not.asar";
+ /** We use the default profile, defined by DeploymentManager to deploy apps. */
+ public static final ProfileKey defaultProfile = new ProfileKey(ProfileKey.DEFAULT);
+
protected static Test getManagedDeployment(final Class clazz, final String jarNames) throws Exception
{
return getManagedDeployment(clazz, jarNames, false);
@@ -117,7 +120,7 @@
InitialContext ctx = new InitialContext();
ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
dm = ps.getDeploymentManager();
- dm.loadProfile(new ProfileKey("profileservice"), false);
+ dm.loadProfile(defaultProfile, false);
return dm;
}
return dm;
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ConnectionFactoryRestartUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ConnectionFactoryRestartUnitTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ConnectionFactoryRestartUnitTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -36,9 +36,6 @@
*/
public class ConnectionFactoryRestartUnitTestCase extends AbstractProfileServiceTest
{
-
- /** The profile name */
- private static final String PROFILENAME = "profileservice";
public ConnectionFactoryRestartUnitTestCase(String name)
{
@@ -57,11 +54,5 @@
assertEquals(21, ((SimpleValue) property.getValue()).getValue());
}
-
- @Override
- protected String getProfileName()
- {
- return PROFILENAME;
- }
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/JmsDestinationRestartUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/JmsDestinationRestartUnitTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/JmsDestinationRestartUnitTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -37,9 +37,6 @@
public class JmsDestinationRestartUnitTestCase extends AbstractProfileServiceTest
{
- /** The profile name */
- private static final String PROFILENAME = "profileservice";
-
public JmsDestinationRestartUnitTestCase(String name)
{
super(name);
@@ -101,14 +98,6 @@
undeployPackage(new String[] { deploymentName });
}
}
-
-
- @Override
- protected String getProfileName()
- {
- return PROFILENAME;
- }
-
-
+
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/PersistedDataSourceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/PersistedDataSourceUnitTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/PersistedDataSourceUnitTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -37,10 +37,7 @@
*/
public class PersistedDataSourceUnitTestCase extends AbstractProfileServiceTest
{
-
- /** The profile name */
- private static final String PROFILENAME = "profileservice";
-
+
public PersistedDataSourceUnitTestCase(String name)
{
super(name);
@@ -155,12 +152,5 @@
undeployPackage(new String[] { deploymentName });
}
}
-
- @Override
- protected String getProfileName()
- {
- return PROFILENAME;
- }
-
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -46,6 +46,10 @@
public abstract class AbstractProfileServiceTest extends JBossTestCase implements ProgressListener
{
+ /** We use the default profile, defined by DeploymentManager to deploy apps. */
+ public static final ProfileKey defaultProfile = new ProfileKey(ProfileKey.DEFAULT);
+
+ /** The deployment manager. */
protected DeploymentManager deployMgr;
public AbstractProfileServiceTest(String name)
@@ -53,7 +57,10 @@
super(name);
}
- protected abstract String getProfileName();
+ protected String getProfileName()
+ {
+ return null;
+ }
public void progressEvent(ProgressEvent eventInfo)
{
@@ -110,6 +117,14 @@
}
}
+ protected ProfileKey getProfileKey()
+ {
+ if(getProfileName() == null)
+ return defaultProfile;
+
+ return new ProfileKey(getProfileName());
+ }
+
/**
* Obtain the ProfileService.ManagementView
* @return
@@ -137,12 +152,10 @@
{
if( deployMgr == null )
{
- String profileName = getProfileName();
InitialContext ctx = getInitialContext();
ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
deployMgr = ps.getDeploymentManager();
- ProfileKey defaultKey = new ProfileKey(profileName);
- deployMgr.loadProfile(defaultKey, false);
+ deployMgr.loadProfile(getProfileKey(), false);
// Init the VFS to setup the vfs* protocol handlers
VFS.init();
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ConnectionFactoryOverrideTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ConnectionFactoryOverrideTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ConnectionFactoryOverrideTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -58,13 +58,6 @@
managementView.updateComponent(component);
}
-
- @Override
- protected String getProfileName()
- {
- return "profileservice";
- }
-
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/JmsDestinationOverrideTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/JmsDestinationOverrideTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/JmsDestinationOverrideTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -35,9 +35,6 @@
*/
public class JmsDestinationOverrideTestCase extends AbstractProfileServiceTest
{
-
- /** The profile name */
- private static final String PROFILENAME = "profileservice";
public JmsDestinationOverrideTestCase(String name)
{
@@ -103,13 +100,6 @@
throw e;
}
}
-
-
- @Override
- protected String getProfileName()
- {
- return PROFILENAME;
- }
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ProfileServiceOverrideTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ProfileServiceOverrideTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ProfileServiceOverrideTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -38,9 +38,6 @@
*/
public class ProfileServiceOverrideTestCase extends AbstractProfileServiceTest
{
-
- /** The profile name */
- private static final String PROFILENAME = "profileservice";
public ProfileServiceOverrideTestCase(String name)
{
@@ -220,11 +217,4 @@
// undeployPackage(new String[] { deploymentName });
}
}
-
- @Override
- protected String getProfileName()
- {
- return PROFILENAME;
- }
-
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -48,6 +48,10 @@
public abstract class AbstractProfileServiceTest
extends JBossTestCase
{
+
+ /** We use the default profile, defined by DeploymentManager to deploy apps. */
+ public static final ProfileKey defaultProfile = new ProfileKey(ProfileKey.DEFAULT);
+
protected ManagementView activeView;
protected DeploymentManager deployMgr;
private MetaValueFactory metaValueFactory;
@@ -60,10 +64,16 @@
/**
* @return the ProfileKey.name to use when loading the profile
*/
- protected abstract String getProfileName();
+ protected String getProfileName()
+ {
+ return null;
+ }
protected ProfileKey getProfileKey()
{
+ if(getProfileName() == null)
+ return defaultProfile;
+
return new ProfileKey(getProfileName());
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/DeployUnitTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -34,7 +34,6 @@
import org.jboss.deployers.spi.management.deploy.ProgressEvent;
import org.jboss.deployers.spi.management.deploy.ProgressListener;
import org.jboss.managed.api.ManagedDeployment;
-import org.jboss.profileservice.spi.ProfileKey;
import org.jboss.test.profileservice.ejb2x.BeanHome;
import org.jboss.test.profileservice.ejb2x.BeanRemote;
import org.jboss.test.profileservice.ejb3x.BeanRemote3x;
@@ -59,18 +58,14 @@
{
super.setUp();
DeploymentManager deployMgr = getDeploymentManager();
- String profileName = getProfileName();
- ProfileKey key = new ProfileKey(profileName);
- deployMgr.loadProfile(key, false);
+ deployMgr.loadProfile(getProfileKey(), false);
}
@Override
protected void tearDown() throws Exception
{
DeploymentManager deployMgr = getDeploymentManager();
- String profileName = getProfileName();
- ProfileKey key = new ProfileKey(profileName);
- deployMgr.releaseProfile(key, true);
+ deployMgr.releaseProfile(getProfileKey(), true);
super.tearDown();
}
@@ -81,12 +76,6 @@
getLog().debug(eventInfo);
}
- @Override
- protected String getProfileName()
- {
- return "profileservice";
- }
-
@SuppressWarnings("deprecation")
protected void testDeployment(String name, String type, ManagedDeploymentTester tester) throws Exception
{
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -110,10 +110,4 @@
ManagedComponent topic = getManagementView().getComponent("testCreateTopic", type);
assertNull("topic should be removed " + topic, topic);
}
-
- @Override
- protected String getProfileName()
- {
- return "profileservice";
- }
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ManagementViewUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ManagementViewUnitTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ManagementViewUnitTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -34,9 +34,6 @@
*/
public class ManagementViewUnitTestCase extends AbstractProfileServiceTest
{
-
- /** The profile name */
- private static final String PROFILENAME = "profileservice";
public ManagementViewUnitTestCase(String name)
{
@@ -65,11 +62,4 @@
}
}
}
-
- @Override
- protected String getProfileName()
- {
- return PROFILENAME;
- }
-
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -73,6 +73,9 @@
*/
public class ProfileServiceUnitTestCase extends AbstractProfileServiceTest
{
+ /** The profileservice server name. */
+ public static final String PROFILESERVICE_SERVER_NAME = "profileservice";
+
/**
* We need to define the order in which tests runs
* @return
@@ -130,9 +133,9 @@
{
InitialContext ctx = super.getInitialContext();
ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
- Collection<ProfileKey> keys = ps.getProfileKeys();
+ Collection<ProfileKey> keys = ps.getActiveProfileKeys();
log.info("getProfileKeys: "+keys);
- ProfileKey defaultKey = new ProfileKey("profileservice");
+ ProfileKey defaultKey = new ProfileKey(PROFILESERVICE_SERVER_NAME);
assertTrue("keys contains profileservice", keys.contains(defaultKey));
}
@@ -155,7 +158,7 @@
for (String name : names)
{
// Look for /server/profileservice/
- String serverName = "/server/" + getProfileName() + "/";
+ String serverName = "/server/"+ PROFILESERVICE_SERVER_NAME + "/";
int index = name.indexOf(serverName);
if (index == -1)
{
@@ -821,12 +824,6 @@
// Private and protected
- @Override
- protected String getProfileName()
- {
- return "profileservice";
- }
-
private void addNonXaDsProperties(Map<String, MetaValue> propValues,
String jndiName,
String rarName,
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/SecurityManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/SecurityManagedObjectsTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/SecurityManagedObjectsTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -389,17 +389,6 @@
assertNotNull(mc);
}
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.test.profileservice.test.AbstractProfileServiceTest#getProfileName()
- */
- @Override
- protected String getProfileName()
- {
- return "profileservice";
- }
-
/**
* <p>
* Deploy a resource, registering it with the profile service.
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -37,7 +37,6 @@
import org.jboss.metatype.api.values.EnumValueSupport;
import org.jboss.metatype.api.values.SimpleValue;
import org.jboss.profileservice.management.matchers.AliasMatcher;
-import org.jboss.profileservice.spi.ProfileKey;
import org.jboss.profileservice.spi.ProfileService;
import org.jboss.test.JBossTestCase;
import org.jboss.virtual.VFS;
@@ -166,11 +165,9 @@
{
if( activeView == null )
{
- String profileName = "profileservice";
InitialContext ctx = getInitialContext();
ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
activeView = ps.getViewManager();
- ProfileKey defaultKey = new ProfileKey(profileName);
// Init the VFS to setup the vfs* protocol handlers
VFS.init();
}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServiceBindingManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServiceBindingManagedObjectsTestCase.java 2009-03-02 10:51:44 UTC (rev 84954)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServiceBindingManagedObjectsTestCase.java 2009-03-02 10:51:45 UTC (rev 84955)
@@ -38,7 +38,7 @@
* </p>
*
* @author Brian Stansberry
- * @version $Revision:$
+ * @version $Revision$
*/
public class ServiceBindingManagedObjectsTestCase extends AbstractProfileServiceTest
{
@@ -259,15 +259,4 @@
}
}
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.test.profileservice.test.AbstractProfileServiceTest#getProfileName()
- */
- @Override
- protected String getProfileName()
- {
- return "profileservice";
- }
}
More information about the jboss-cvs-commits
mailing list