EMBJOPR SVN: r621 - tags.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2009-07-29 14:14:18 -0400 (Wed, 29 Jul 2009)
New Revision: 621
Added:
tags/EmbJopr_1_3_0_GA/
Log:
[maven-scm] copy for tag EmbJopr_1_3_0_GA
Copied: tags/EmbJopr_1_3_0_GA (from rev 620, trunk)
15 years, 5 months
EMBJOPR SVN: r620 - in trunk: core and 2 other directories.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2009-07-29 14:14:05 -0400 (Wed, 29 Jul 2009)
New Revision: 620
Modified:
trunk/core/pom.xml
trunk/jbas4/pom.xml
trunk/jbas5/pom.xml
trunk/pom.xml
Log:
[maven-release-plugin] prepare release EmbJopr_1_3_0_GA
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2009-07-29 18:13:07 UTC (rev 619)
+++ trunk/core/pom.xml 2009-07-29 18:14:05 UTC (rev 620)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.jboss.jopr</groupId>
<artifactId>jopr-embedded-parent</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.0.GA</version>
</parent>
<groupId>org.jboss.jopr</groupId>
@@ -35,8 +35,8 @@
</description>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/embjopr/trunk/core/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/trunk/core/</developerConnection>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/embjopr/tags/EmbJopr_1_3_0_GA/core</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/tags/EmbJopr_1_3_0_GA/core</developerConnection>
</scm>
<properties>
Modified: trunk/jbas4/pom.xml
===================================================================
--- trunk/jbas4/pom.xml 2009-07-29 18:13:07 UTC (rev 619)
+++ trunk/jbas4/pom.xml 2009-07-29 18:14:05 UTC (rev 620)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.jopr</groupId>
<artifactId>jopr-embedded-parent</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.0.GA</version>
</parent>
<groupId>org.jboss.jopr</groupId>
@@ -14,8 +14,8 @@
<name>JBossAS 4.x Administration Console</name>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/embjopr/trunk/jbas4/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/trunk/jbas4/</developerConnection>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/embjopr/tags/EmbJopr_1_3_0_GA/jbas4</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/tags/EmbJopr_1_3_0_GA/jbas4</developerConnection>
</scm>
<properties>
Modified: trunk/jbas5/pom.xml
===================================================================
--- trunk/jbas5/pom.xml 2009-07-29 18:13:07 UTC (rev 619)
+++ trunk/jbas5/pom.xml 2009-07-29 18:14:05 UTC (rev 620)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.jopr</groupId>
<artifactId>jopr-embedded-parent</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.0.GA</version>
</parent>
<groupId>org.jboss.jopr</groupId>
@@ -14,8 +14,8 @@
<name>JBossAS 5.x Administration Console</name>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/embjopr/trunk/jbas5/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/trunk/jbas5/</developerConnection>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/embjopr/tags/EmbJopr_1_3_0_GA/jbas5</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/tags/EmbJopr_1_3_0_GA/jbas5</developerConnection>
</scm>
<properties>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-07-29 18:13:07 UTC (rev 619)
+++ trunk/pom.xml 2009-07-29 18:14:05 UTC (rev 620)
@@ -30,7 +30,7 @@
<groupId>org.jboss.jopr</groupId>
<artifactId>jopr-embedded-parent</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.0.GA</version>
<packaging>pom</packaging>
<name>Embedded Jopr</name>
<description>a web application that provides administration and monitoring of the app server instance to which it is deployed</description>
@@ -42,8 +42,8 @@
</organization>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/embjopr/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/trunk/</developerConnection>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/embjopr/tags/EmbJopr_1_3_0_GA</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/tags/EmbJopr_1_3_0_GA</developerConnection>
</scm>
<issueManagement>
15 years, 5 months
EMBJOPR SVN: r619 - trunk/jsfunit/testdata.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-07-29 14:13:07 -0400 (Wed, 29 Jul 2009)
New Revision: 619
Modified:
trunk/jsfunit/testdata/hudson_shell_script.sh
Log:
* Current hudson shell script >> SVN.
Modified: trunk/jsfunit/testdata/hudson_shell_script.sh
===================================================================
--- trunk/jsfunit/testdata/hudson_shell_script.sh 2009-07-29 18:11:06 UTC (rev 618)
+++ trunk/jsfunit/testdata/hudson_shell_script.sh 2009-07-29 18:13:07 UTC (rev 619)
@@ -2,8 +2,14 @@
rm -rf embjopr/target
rm -rf embjopr/jsfunit/target
+
+### Temporarily go back to old AS, RHQ doesn't work with current new (2009-07-14)
+#cd jbosseap-5.x/
+#svn up
+#cd ..
+
### Build JBoss AS, checked out / updated by Hudson
-cd jbossas-5.x/build
+cd jbosseap-5.x/build
./build.sh clean
./build.sh -Dbuild.unsecured=true
cd ../..
@@ -11,7 +17,7 @@
### Set JBoss AS home dir
# We don't want to stick with specific version, so get the home dynamically.
# Get only the last dir. Hopefully versions will be named alphabetically.
-export JBOSS_HOME=`pwd`/`ls -d -1 jbossas-5.x/build/output/* | tail -n 1`
+export JBOSS_HOME=`pwd`/`ls -d -1 jbosseap-5.x/build/output/* | tail -n 1`
echo "JBOSS_HOME: $JBOSS_HOME"
# Remove bundled AS console
# Name of war changed on 04/24 - smcgowan
@@ -22,12 +28,17 @@
### List JVMs
jps -l
+
cd embjopr
mvn install -Dmaven.test.skip=true --update-snapshots
cd jsfunit
rm -rf target
+
echo "Launching tests; binding JBoss AS to MYTESTIP_1 == $MYTESTIP_1"
-mvn -Pjboss5x install --fail-never --update-snapshots -DJBOSS_HOME=$JBOSS_HOME -Dcargo.jboss.bind.address=$MYTESTIP_1 -Dhtmlunit.browser=ie7
+#echo -e "USER hudson hudson hudson hudson\nNICK HudsonBot\nJOIN #embjopr\nPRIVMSG #embjopr :`hostname`\nQUIT\n" |nc irc.devel.redhat.com 6667 || :
+echo `hostname`:4000 >> /tmp/embjopr-debug.log
+
+mvn -Pjboss5x install --fail-never --update-snapshots -DJBOSS_HOME=$JBOSS_HOME -Dcargo.jboss.bind.address=$MYTESTIP_1
sleep 5
15 years, 5 months
EMBJOPR SVN: r618 - trunk.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2009-07-29 14:11:06 -0400 (Wed, 29 Jul 2009)
New Revision: 618
Modified:
trunk/pom.xml
Log:
prepare for 1.3.0.GA release
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-07-29 18:02:45 UTC (rev 617)
+++ trunk/pom.xml 2009-07-29 18:11:06 UTC (rev 618)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.0.EmbJopr.1.3.0-3</version>
</parent>
<groupId>org.jboss.jopr</groupId>
@@ -37,7 +37,7 @@
<url>http://jboss.org/embjopr/</url>
<inceptionYear>2007</inceptionYear>
<organization>
- <name>JBoss, a division of Red Hat</name>
+ <name>JBoss, by Red Hat</name>
<url>http://jboss.com/</url>
</organization>
@@ -64,9 +64,9 @@
<!-- dependency versions -->
<jaxb-api.version>2.1</jaxb-api.version>
<jaxb-impl.version>2.1.6</jaxb-impl.version>
- <jopr.version>2.3.0-SNAPSHOT</jopr.version>
+ <jopr.version>2.3.0.EmbJopr.1.3.0-3</jopr.version>
<richfaces.version>3.3.0.GA</richfaces.version>
- <rhq.version>1.3.0-SNAPSHOT</rhq.version>
+ <rhq.version>1.3.0.EmbJopr.1.3.0-3</rhq.version>
<seam.version>2.1.0.SP1</seam.version>
<seam.embedded.version>beta3.SP3</seam.embedded.version>
<!-- This is a special patched version of not-yet-released Facelets 1.1.15,
@@ -125,7 +125,7 @@
<module>core</module>
<module>jbas4</module>
<module>jbas5</module>
- <module>jsfunit</module>
+ <!--<module>jsfunit</module>-->
</modules>
<repositories>
15 years, 5 months
EMBJOPR SVN: r617 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-07-29 14:02:45 -0400 (Wed, 29 Jul 2009)
New Revision: 617
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
Log:
* ResourceTestBase - remaining methods secured by default
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-07-29 17:54:46 UTC (rev 616)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-07-29 18:02:45 UTC (rev 617)
@@ -184,7 +184,7 @@
*/
protected void configureResource(String category, String subCategory, String name, Map<String, MetaValue> propsMap,
Map<String, MetaValue> propsMapChanges, ComponentType componentType, String expectedMessage) throws Exception {
- configureResource(category, subCategory, name, propsMap, propsMapChanges, componentType, expectedMessage, false);
+ configureResource(category, subCategory, name, propsMap, propsMapChanges, componentType, expectedMessage, true);
}
/**
@@ -223,7 +223,7 @@
*/
protected void unsetResourceProperties(String category, String subCategory, String name, Map<String, MetaValue> propsMap,
String[] propsToUnset, ComponentType componentType, String expectedMessage) throws Exception {
- unsetResourceProperties(subCategory, subCategory, name, propsMap, propsToUnset, componentType, expectedMessage, false);
+ unsetResourceProperties(subCategory, subCategory, name, propsMap, propsToUnset, componentType, expectedMessage, true);
}
/**
15 years, 5 months
EMBJOPR SVN: r616 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-07-29 13:54:46 -0400 (Wed, 29 Jul 2009)
New Revision: 616
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceConfigurationTest.java
Log:
* DatasourceConfTest - removed track-connection-by-tx
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceConfigurationTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceConfigurationTest.java 2009-07-29 17:49:31 UTC (rev 615)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceConfigurationTest.java 2009-07-29 17:54:46 UTC (rev 616)
@@ -139,7 +139,7 @@
enableOrDisableFormInput("user-name", Boolean.FALSE, RESOURCE_CONFIGURATION_FORM);
enableOrDisableFormInput("idle-timeout-minutes", Boolean.FALSE, RESOURCE_CONFIGURATION_FORM);
- enableOrDisableFormInput("track-connection-by-tx", Boolean.FALSE, RESOURCE_CONFIGURATION_FORM);
+ //enableOrDisableFormInput("track-connection-by-tx", Boolean.FALSE, RESOURCE_CONFIGURATION_FORM);
client.click(SAVE_BUTTON);
// Check for the appropriate success messages
15 years, 5 months
EMBJOPR SVN: r615 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-07-29 13:49:31 -0400 (Wed, 29 Jul 2009)
New Revision: 615
Removed:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTestUtils.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/RepeatedDeploymentViaPSTest.java
Log:
* ProfileServiceTest removed from run.
Deleted: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTestUtils.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTestUtils.java 2009-07-29 17:47:55 UTC (rev 614)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTestUtils.java 2009-07-29 17:49:31 UTC (rev 615)
@@ -1,294 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jopr.jsfunit.as5.app.ear;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.naming.InitialContext;
-
-import javax.naming.NamingException;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
-import org.jboss.jopr.jsfunit.EmbjoprTestCase;
-import org.jboss.jopr.jsfunit.util.jaas.SecuredProfileServiceAccess;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.DeploymentTemplateInfo;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.metatype.api.values.MetaValueFactory;
-import org.jboss.profileservice.spi.ProfileKey;
-
-
-
-/**
- * @author Ondrej Zizka, original class by Alexey Loubyansky
- */
-public class ProfileServiceTestUtils
- extends EmbjoprTestCase
-{
-
- /** 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;
-
-
- public ProfileServiceTestUtils(String name){
- super();
- }
- public ProfileServiceTestUtils(){
- super();
- }
-
-
- public static Test suite(){
- return new TestSuite(ProfileServiceTestUtils.class);
- }
-
-
-
-
-
- /**
- * List the contents of ProfileService.
- */
- public void testProfileServiceListContent() throws NamingException, Exception{
- ManagementView managementView = SecuredProfileServiceAccess.getInstance().getManagementView();
-
- log.info("List of ProfileService contents (default profile):");
-
- StringBuilder sb = new StringBuilder(4*1024);
- for( ComponentType type : managementView.getComponentTypes() ){
- sb.append(" * Type: ").append(type.toString()).append("\n");
- for( ManagedComponent component : managementView.getComponentsForType(type) ){
- sb.append(" * Component: ").append(component.toString()).append("\n");
- }
- }
-
- log.info(sb.toString());
- }
-
-
-
-
-
- /**
- * @return the ProfileKey.name to use when loading the profile
- */
- protected String getProfileName(){ return null; }
-
- protected ProfileKey getProfileKey()
- {
- if(getProfileName() == null)
- return defaultProfile;
-
- return new ProfileKey(getProfileName());
- }
-
- protected void removeDeployment(String deployment)
- throws Exception
- {
- String names[] = new String[] {deployment};
- DeploymentManager deployMgr_ = getDeploymentManager();
- try
- {
- DeploymentProgress progress = deployMgr_.stop(names);
- progress.run();
- assertFalse("failed: " + progress.getDeploymentStatus().getFailure(), progress.getDeploymentStatus().isFailed());
- }
- finally
- {
- DeploymentProgress progress = deployMgr_.remove(names);
- progress.run();
- assertFalse("failed: " + progress.getDeploymentStatus().getFailure(), progress.getDeploymentStatus().isFailed());
- }
- }
-
- protected void createComponentTest(String templateName,
- Map<String, MetaValue> propValues,
- String deploymentName,
- ComponentType componentType, String componentName)
- throws Exception
- {
- createComponentTest(templateName, propValues, deploymentName, componentType, componentName, true);
- }
-
- protected void createComponentTest(String templateName,
- Map<String, MetaValue> propValues,
- String deploymentName,
- ComponentType componentType, String componentName,
- boolean processChanges)
- throws Exception
- {
- Set<String> removedPropNames = Collections.emptySet();
- createComponentTest(templateName, propValues, removedPropNames,
- deploymentName, componentType, componentName, processChanges);
- }
- protected void createComponentTest(String templateName,
- Map<String, MetaValue> propValues,
- Set<String> removedPropNames,
- String deploymentName,
- ComponentType componentType, String componentName,
- boolean processChanges)
- throws Exception
- {
- ManagementView mgtView = getManagementView();
- DeploymentTemplateInfo info = mgtView.getTemplate(templateName);
- assertNotNull("template " + templateName + " found", info);
- Map<String, ManagedProperty> props = info.getProperties();
- for(String propName : propValues.keySet())
- {
- ManagedProperty prop = props.get(propName);
- log.debug("createComponentTest("+propName+") before: "+prop.getValue());
- assertNotNull("property " + propName + " found in template " + templateName, prop);
- prop.setValue(propValues.get(propName));
- log.debug("createComponentTest("+propName+") after: "+prop.getValue());
- }
- for(String propName : removedPropNames)
- {
- ManagedProperty prop = props.get(propName);
- prop.setRemoved(true);
- log.debug("removed property: "+propName);
- }
-
- mgtView.applyTemplate(deploymentName, info);
- if(processChanges)
- {
- mgtView.process();
-
- // reload the view
- activeView = null;
- mgtView = getManagementView();
- ManagedComponent dsMC = getManagedComponent(mgtView, componentType, componentName);
- assertNotNull(dsMC);
-
- Set<String> mcPropNames = new HashSet<String>(dsMC.getPropertyNames());
- for(String propName : propValues.keySet())
- {
- ManagedProperty prop = dsMC.getProperty(propName);
- assertNotNull(prop);
- Object propValue = prop.getValue();
- Object expectedValue = propValues.get(propName);
- assertEquals(prop.getName(), expectedValue, propValue);
-
- mcPropNames.remove(propName);
- }
-
- if(!mcPropNames.isEmpty())
- {
- log.warn(getName() + "> untested properties: " + mcPropNames);
- }
- }
- }
-
- /**
- * Obtain the ProfileService.ManagementView
- * @return
- * @throws Exception
- */
- protected ManagementView getManagementView()
- throws Exception
- {
- /*
- if( activeView == null )
- {
- InitialContext ctx = getInitialContext();
- ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
- activeView = ps.getViewManager();
- // Init the VFS to setup the vfs* protocol handlers
- VFS.init();
- }
- // Reload
- activeView.load();
- return activeView;
- /**/
-
- return SecuredProfileServiceAccess.getInstance().getManagementView();
- }
- /**
- * Obtain the ProfileService.ManagementView
- * @return
- * @throws Exception
- */
- protected DeploymentManager getDeploymentManager()
- throws Exception
- {
- /*
- if( deployMgr == null )
- {
- InitialContext ctx = getInitialContext();
- ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
- deployMgr = ps.getDeploymentManager();
- deployMgr.loadProfile(getProfileKey());
- // Init the VFS to setup the vfs* protocol handlers
- VFS.init();
- }
- return deployMgr;
- /**/
- return SecuredProfileServiceAccess.getInstance().getDeploymentManager();
- }
-
- /**
- * Locate the given ComponentType with the given component name.
- *
- * @param mgtView -
- * @return the matching ManagedComponent if found, null otherwise
- * @throws Exception
- */
- protected ManagedComponent getManagedComponent(ManagementView mgtView, ComponentType type, String name)
- throws Exception
- {
- Set<ManagedComponent> comps = mgtView.getComponentsForType(type);
- ManagedComponent mc = null;
- for (ManagedComponent comp : comps)
- {
- String cname = comp.getName();
- if( cname.endsWith(name) )
- {
- mc = comp;
- break;
- }
- }
- return mc;
- }
-
- protected MetaValueFactory getMetaValueFactory()
- {
- if(metaValueFactory == null)
- metaValueFactory = MetaValueFactory.getInstance();
- return metaValueFactory;
- }
-
- InitialContext getInitialContext() throws NamingException{
- return new InitialContext();
- }
-
-}
Deleted: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/RepeatedDeploymentViaPSTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/RepeatedDeploymentViaPSTest.java 2009-07-29 17:47:55 UTC (rev 614)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/RepeatedDeploymentViaPSTest.java 2009-07-29 17:49:31 UTC (rev 615)
@@ -1,148 +0,0 @@
-package org.jboss.jopr.jsfunit.as5.app.ear;
-
-
-
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Set;
-
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
-import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
-import org.jboss.logging.Logger;
-import org.jboss.managed.api.ManagedDeployment;
-import org.jboss.deployers.spi.management.deploy.ProgressListener;
-import org.jboss.jopr.jsfunit.AppConstants;
-import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
-
-
-/**
- * Mostly copied from
- * jboss-as-5.x/testsuite/src/main/org/jboss/test/profileservice/test
- */
-public class RepeatedDeploymentViaPSTest extends ProfileServiceTestUtils implements ProgressListener {
-
-
-
- public void testRepeatedDeploymentViaProfileService() throws Exception {
-
-
- final String DEPLOYABLE_NAME = AppConstants.BASIC_EAR;
- int TURNS = 100;
-
- String earFilePath = ejtt.getTestDataDir() + "/ear/"+DEPLOYABLE_NAME;
-
- for (int i = TURNS; i > 0; i--) {
- log.info("Remaining EAR deploys: "+i);
- // Deploy and undeploy the EAR.
- doDeployment(earFilePath, "ear", null);
- }
-
- }
-
-
-
-
-
-
-
- public void progressEvent(org.jboss.deployers.spi.management.deploy.ProgressEvent eventInfo) {
- getLog().debug(eventInfo);
- }
-
- public URL getDeployURL( String file ) throws MalformedURLException{
- return new URL("file:///"+ System.getProperty(AppConstants.SYSPROP_DEPLOY_DIR)+'/'+file );
- }
-
-
-
- protected final Logger log = Logger.getLogger(this.getClass().getName());
- Logger getLog(){ return log; }
-
- @SuppressWarnings("deprecation")
- protected void doDeployment(String name, String type, ManagedDeploymentTester tester) throws Exception
- {
- DeploymentManager deployMgr = getDeploymentManager();
- URL contentURL = getDeployURL(name);
- assertNotNull(contentURL);
- getLog().debug(contentURL);
- // TODO - hack to get off JDK's url handling
- String urlString = contentURL.toExternalForm();
- int p = urlString.indexOf(":/");
- contentURL = new URL("vfszip" + urlString.substring(p));
- getLog().debug(contentURL);
-
- DeploymentStatus status;
- DeploymentProgress progress = deployMgr.distribute(name, contentURL, true);
- progress.addProgressListener(this);
- progress.run();
- String[] uploadedNames = {};
- try
- {
- status = progress.getDeploymentStatus();
- assertTrue("DeploymentStatus.isCompleted: " + status, status.isCompleted());
- // It should not be running yet
- assertFalse("DeploymentStatus.isRunning: " + status, status.isRunning());
- assertFalse("DeploymentStatus.isFailed: " + status, status.isFailed());
-
- // Get the unique deployment name
- uploadedNames = progress.getDeploymentID().getRepositoryNames();
- getLog().debug("Uploaded deployment names: "+Arrays.asList(uploadedNames));
- // Now start the deployment
- progress = deployMgr.start(uploadedNames);
- progress.addProgressListener(this);
- progress.run();
- try
- {
- status = progress.getDeploymentStatus();
- assertTrue("DeploymentStatus.isCompleted: " + status, status.isCompleted());
- assertFalse("DeploymentStatus.isRunning: " + status, status.isRunning());
- assertFalse("DeploymentStatus.isFailed: " + status, status.isFailed());
- // Check for a
- ManagementView mgtView = getManagementView();
- ManagedDeployment deployment = mgtView.getDeployment(uploadedNames[0]);
- assertNotNull(deployment);
- getLog().info("Found " + type + " deployment: " + deployment);
- Set<String> types = deployment.getTypes();
- if (types != null && types.isEmpty() == false)
- assertTrue("Missing type: " + type + ", available: " + types, types.contains(type));
- if (tester != null)
- {
- tester.testManagedDeployment();
- }
- }
- finally
- {
- //Thread.sleep(15 * 1000); // 15 secs >> more than it takes for reaper to run :-)
-
- // Stop/remove the deployment
- progress = deployMgr.stop(uploadedNames);
- progress.addProgressListener(this);
- progress.run();
- status = progress.getDeploymentStatus();
- assertTrue("DeploymentStatus.isCompleted: " + status, status.isCompleted());
- assertFalse("DeploymentStatus.isFailed: " + status, status.isFailed());
- }
- }
- finally
- {
- progress = deployMgr.remove(uploadedNames);
- progress.addProgressListener(this);
- progress.run();
- status = progress.getDeploymentStatus();
- assertTrue("DeploymentStatus.isCompleted: " + status, status.isCompleted());
- assertFalse("DeploymentStatus.isFailed: " + status, status.isFailed());
- }
- }
-
-
- private interface ManagedDeploymentTester
- {
- void testManagedDeployment() throws Exception;
- }
-
-}
15 years, 5 months
EMBJOPR SVN: r614 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-07-29 13:47:55 -0400 (Wed, 29 Jul 2009)
New Revision: 614
Added:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTestUtils.java
Removed:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTest.java
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/RepeatedDeploymentViaPSTest.java
Log:
* ProfileServiceTest removed from run.
Deleted: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTest.java 2009-07-29 00:12:29 UTC (rev 613)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTest.java 2009-07-29 17:47:55 UTC (rev 614)
@@ -1,294 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jopr.jsfunit.as5.app.ear;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.naming.InitialContext;
-
-import javax.naming.NamingException;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
-import org.jboss.jopr.jsfunit.EmbjoprTestCase;
-import org.jboss.jopr.jsfunit.util.jaas.SecuredProfileServiceAccess;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.DeploymentTemplateInfo;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.metatype.api.values.MetaValueFactory;
-import org.jboss.profileservice.spi.ProfileKey;
-
-
-
-/**
- * @author Ondrej Zizka, original class by Alexey Loubyansky
- */
-public class ProfileServiceTest
- extends EmbjoprTestCase
-{
-
- /** 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;
-
-
- public ProfileServiceTest(String name){
- super();
- }
- public ProfileServiceTest(){
- super();
- }
-
-
- public static Test suite(){
- return new TestSuite(ProfileServiceTest.class);
- }
-
-
-
-
-
- /**
- * List the contents of ProfileService.
- */
- public void testProfileServiceListContent() throws NamingException, Exception{
- ManagementView managementView = SecuredProfileServiceAccess.getInstance().getManagementView();
-
- log.info("List of ProfileService contents (default profile):");
-
- StringBuilder sb = new StringBuilder(4*1024);
- for( ComponentType type : managementView.getComponentTypes() ){
- sb.append(" * Type: ").append(type.toString()).append("\n");
- for( ManagedComponent component : managementView.getComponentsForType(type) ){
- sb.append(" * Component: ").append(component.toString()).append("\n");
- }
- }
-
- log.info(sb.toString());
- }
-
-
-
-
-
- /**
- * @return the ProfileKey.name to use when loading the profile
- */
- protected String getProfileName(){ return null; }
-
- protected ProfileKey getProfileKey()
- {
- if(getProfileName() == null)
- return defaultProfile;
-
- return new ProfileKey(getProfileName());
- }
-
- protected void removeDeployment(String deployment)
- throws Exception
- {
- String names[] = new String[] {deployment};
- DeploymentManager deployMgr_ = getDeploymentManager();
- try
- {
- DeploymentProgress progress = deployMgr_.stop(names);
- progress.run();
- assertFalse("failed: " + progress.getDeploymentStatus().getFailure(), progress.getDeploymentStatus().isFailed());
- }
- finally
- {
- DeploymentProgress progress = deployMgr_.remove(names);
- progress.run();
- assertFalse("failed: " + progress.getDeploymentStatus().getFailure(), progress.getDeploymentStatus().isFailed());
- }
- }
-
- protected void createComponentTest(String templateName,
- Map<String, MetaValue> propValues,
- String deploymentName,
- ComponentType componentType, String componentName)
- throws Exception
- {
- createComponentTest(templateName, propValues, deploymentName, componentType, componentName, true);
- }
-
- protected void createComponentTest(String templateName,
- Map<String, MetaValue> propValues,
- String deploymentName,
- ComponentType componentType, String componentName,
- boolean processChanges)
- throws Exception
- {
- Set<String> removedPropNames = Collections.emptySet();
- createComponentTest(templateName, propValues, removedPropNames,
- deploymentName, componentType, componentName, processChanges);
- }
- protected void createComponentTest(String templateName,
- Map<String, MetaValue> propValues,
- Set<String> removedPropNames,
- String deploymentName,
- ComponentType componentType, String componentName,
- boolean processChanges)
- throws Exception
- {
- ManagementView mgtView = getManagementView();
- DeploymentTemplateInfo info = mgtView.getTemplate(templateName);
- assertNotNull("template " + templateName + " found", info);
- Map<String, ManagedProperty> props = info.getProperties();
- for(String propName : propValues.keySet())
- {
- ManagedProperty prop = props.get(propName);
- log.debug("createComponentTest("+propName+") before: "+prop.getValue());
- assertNotNull("property " + propName + " found in template " + templateName, prop);
- prop.setValue(propValues.get(propName));
- log.debug("createComponentTest("+propName+") after: "+prop.getValue());
- }
- for(String propName : removedPropNames)
- {
- ManagedProperty prop = props.get(propName);
- prop.setRemoved(true);
- log.debug("removed property: "+propName);
- }
-
- mgtView.applyTemplate(deploymentName, info);
- if(processChanges)
- {
- mgtView.process();
-
- // reload the view
- activeView = null;
- mgtView = getManagementView();
- ManagedComponent dsMC = getManagedComponent(mgtView, componentType, componentName);
- assertNotNull(dsMC);
-
- Set<String> mcPropNames = new HashSet<String>(dsMC.getPropertyNames());
- for(String propName : propValues.keySet())
- {
- ManagedProperty prop = dsMC.getProperty(propName);
- assertNotNull(prop);
- Object propValue = prop.getValue();
- Object expectedValue = propValues.get(propName);
- assertEquals(prop.getName(), expectedValue, propValue);
-
- mcPropNames.remove(propName);
- }
-
- if(!mcPropNames.isEmpty())
- {
- log.warn(getName() + "> untested properties: " + mcPropNames);
- }
- }
- }
-
- /**
- * Obtain the ProfileService.ManagementView
- * @return
- * @throws Exception
- */
- protected ManagementView getManagementView()
- throws Exception
- {
- /*
- if( activeView == null )
- {
- InitialContext ctx = getInitialContext();
- ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
- activeView = ps.getViewManager();
- // Init the VFS to setup the vfs* protocol handlers
- VFS.init();
- }
- // Reload
- activeView.load();
- return activeView;
- /**/
-
- return SecuredProfileServiceAccess.getInstance().getManagementView();
- }
- /**
- * Obtain the ProfileService.ManagementView
- * @return
- * @throws Exception
- */
- protected DeploymentManager getDeploymentManager()
- throws Exception
- {
- /*
- if( deployMgr == null )
- {
- InitialContext ctx = getInitialContext();
- ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
- deployMgr = ps.getDeploymentManager();
- deployMgr.loadProfile(getProfileKey());
- // Init the VFS to setup the vfs* protocol handlers
- VFS.init();
- }
- return deployMgr;
- /**/
- return SecuredProfileServiceAccess.getInstance().getDeploymentManager();
- }
-
- /**
- * Locate the given ComponentType with the given component name.
- *
- * @param mgtView -
- * @return the matching ManagedComponent if found, null otherwise
- * @throws Exception
- */
- protected ManagedComponent getManagedComponent(ManagementView mgtView, ComponentType type, String name)
- throws Exception
- {
- Set<ManagedComponent> comps = mgtView.getComponentsForType(type);
- ManagedComponent mc = null;
- for (ManagedComponent comp : comps)
- {
- String cname = comp.getName();
- if( cname.endsWith(name) )
- {
- mc = comp;
- break;
- }
- }
- return mc;
- }
-
- protected MetaValueFactory getMetaValueFactory()
- {
- if(metaValueFactory == null)
- metaValueFactory = MetaValueFactory.getInstance();
- return metaValueFactory;
- }
-
- InitialContext getInitialContext() throws NamingException{
- return new InitialContext();
- }
-
-}
Added: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTestUtils.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTestUtils.java (rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/ProfileServiceTestUtils.java 2009-07-29 17:47:55 UTC (rev 614)
@@ -0,0 +1,294 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jopr.jsfunit.as5.app.ear;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.InitialContext;
+
+import javax.naming.NamingException;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.deployers.spi.management.deploy.DeploymentManager;
+import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
+import org.jboss.jopr.jsfunit.EmbjoprTestCase;
+import org.jboss.jopr.jsfunit.util.jaas.SecuredProfileServiceAccess;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.DeploymentTemplateInfo;
+import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.MetaValueFactory;
+import org.jboss.profileservice.spi.ProfileKey;
+
+
+
+/**
+ * @author Ondrej Zizka, original class by Alexey Loubyansky
+ */
+public class ProfileServiceTestUtils
+ extends EmbjoprTestCase
+{
+
+ /** 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;
+
+
+ public ProfileServiceTestUtils(String name){
+ super();
+ }
+ public ProfileServiceTestUtils(){
+ super();
+ }
+
+
+ public static Test suite(){
+ return new TestSuite(ProfileServiceTestUtils.class);
+ }
+
+
+
+
+
+ /**
+ * List the contents of ProfileService.
+ */
+ public void testProfileServiceListContent() throws NamingException, Exception{
+ ManagementView managementView = SecuredProfileServiceAccess.getInstance().getManagementView();
+
+ log.info("List of ProfileService contents (default profile):");
+
+ StringBuilder sb = new StringBuilder(4*1024);
+ for( ComponentType type : managementView.getComponentTypes() ){
+ sb.append(" * Type: ").append(type.toString()).append("\n");
+ for( ManagedComponent component : managementView.getComponentsForType(type) ){
+ sb.append(" * Component: ").append(component.toString()).append("\n");
+ }
+ }
+
+ log.info(sb.toString());
+ }
+
+
+
+
+
+ /**
+ * @return the ProfileKey.name to use when loading the profile
+ */
+ protected String getProfileName(){ return null; }
+
+ protected ProfileKey getProfileKey()
+ {
+ if(getProfileName() == null)
+ return defaultProfile;
+
+ return new ProfileKey(getProfileName());
+ }
+
+ protected void removeDeployment(String deployment)
+ throws Exception
+ {
+ String names[] = new String[] {deployment};
+ DeploymentManager deployMgr_ = getDeploymentManager();
+ try
+ {
+ DeploymentProgress progress = deployMgr_.stop(names);
+ progress.run();
+ assertFalse("failed: " + progress.getDeploymentStatus().getFailure(), progress.getDeploymentStatus().isFailed());
+ }
+ finally
+ {
+ DeploymentProgress progress = deployMgr_.remove(names);
+ progress.run();
+ assertFalse("failed: " + progress.getDeploymentStatus().getFailure(), progress.getDeploymentStatus().isFailed());
+ }
+ }
+
+ protected void createComponentTest(String templateName,
+ Map<String, MetaValue> propValues,
+ String deploymentName,
+ ComponentType componentType, String componentName)
+ throws Exception
+ {
+ createComponentTest(templateName, propValues, deploymentName, componentType, componentName, true);
+ }
+
+ protected void createComponentTest(String templateName,
+ Map<String, MetaValue> propValues,
+ String deploymentName,
+ ComponentType componentType, String componentName,
+ boolean processChanges)
+ throws Exception
+ {
+ Set<String> removedPropNames = Collections.emptySet();
+ createComponentTest(templateName, propValues, removedPropNames,
+ deploymentName, componentType, componentName, processChanges);
+ }
+ protected void createComponentTest(String templateName,
+ Map<String, MetaValue> propValues,
+ Set<String> removedPropNames,
+ String deploymentName,
+ ComponentType componentType, String componentName,
+ boolean processChanges)
+ throws Exception
+ {
+ ManagementView mgtView = getManagementView();
+ DeploymentTemplateInfo info = mgtView.getTemplate(templateName);
+ assertNotNull("template " + templateName + " found", info);
+ Map<String, ManagedProperty> props = info.getProperties();
+ for(String propName : propValues.keySet())
+ {
+ ManagedProperty prop = props.get(propName);
+ log.debug("createComponentTest("+propName+") before: "+prop.getValue());
+ assertNotNull("property " + propName + " found in template " + templateName, prop);
+ prop.setValue(propValues.get(propName));
+ log.debug("createComponentTest("+propName+") after: "+prop.getValue());
+ }
+ for(String propName : removedPropNames)
+ {
+ ManagedProperty prop = props.get(propName);
+ prop.setRemoved(true);
+ log.debug("removed property: "+propName);
+ }
+
+ mgtView.applyTemplate(deploymentName, info);
+ if(processChanges)
+ {
+ mgtView.process();
+
+ // reload the view
+ activeView = null;
+ mgtView = getManagementView();
+ ManagedComponent dsMC = getManagedComponent(mgtView, componentType, componentName);
+ assertNotNull(dsMC);
+
+ Set<String> mcPropNames = new HashSet<String>(dsMC.getPropertyNames());
+ for(String propName : propValues.keySet())
+ {
+ ManagedProperty prop = dsMC.getProperty(propName);
+ assertNotNull(prop);
+ Object propValue = prop.getValue();
+ Object expectedValue = propValues.get(propName);
+ assertEquals(prop.getName(), expectedValue, propValue);
+
+ mcPropNames.remove(propName);
+ }
+
+ if(!mcPropNames.isEmpty())
+ {
+ log.warn(getName() + "> untested properties: " + mcPropNames);
+ }
+ }
+ }
+
+ /**
+ * Obtain the ProfileService.ManagementView
+ * @return
+ * @throws Exception
+ */
+ protected ManagementView getManagementView()
+ throws Exception
+ {
+ /*
+ if( activeView == null )
+ {
+ InitialContext ctx = getInitialContext();
+ ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
+ activeView = ps.getViewManager();
+ // Init the VFS to setup the vfs* protocol handlers
+ VFS.init();
+ }
+ // Reload
+ activeView.load();
+ return activeView;
+ /**/
+
+ return SecuredProfileServiceAccess.getInstance().getManagementView();
+ }
+ /**
+ * Obtain the ProfileService.ManagementView
+ * @return
+ * @throws Exception
+ */
+ protected DeploymentManager getDeploymentManager()
+ throws Exception
+ {
+ /*
+ if( deployMgr == null )
+ {
+ InitialContext ctx = getInitialContext();
+ ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
+ deployMgr = ps.getDeploymentManager();
+ deployMgr.loadProfile(getProfileKey());
+ // Init the VFS to setup the vfs* protocol handlers
+ VFS.init();
+ }
+ return deployMgr;
+ /**/
+ return SecuredProfileServiceAccess.getInstance().getDeploymentManager();
+ }
+
+ /**
+ * Locate the given ComponentType with the given component name.
+ *
+ * @param mgtView -
+ * @return the matching ManagedComponent if found, null otherwise
+ * @throws Exception
+ */
+ protected ManagedComponent getManagedComponent(ManagementView mgtView, ComponentType type, String name)
+ throws Exception
+ {
+ Set<ManagedComponent> comps = mgtView.getComponentsForType(type);
+ ManagedComponent mc = null;
+ for (ManagedComponent comp : comps)
+ {
+ String cname = comp.getName();
+ if( cname.endsWith(name) )
+ {
+ mc = comp;
+ break;
+ }
+ }
+ return mc;
+ }
+
+ protected MetaValueFactory getMetaValueFactory()
+ {
+ if(metaValueFactory == null)
+ metaValueFactory = MetaValueFactory.getInstance();
+ return metaValueFactory;
+ }
+
+ InitialContext getInitialContext() throws NamingException{
+ return new InitialContext();
+ }
+
+}
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/RepeatedDeploymentViaPSTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/RepeatedDeploymentViaPSTest.java 2009-07-29 00:12:29 UTC (rev 613)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/RepeatedDeploymentViaPSTest.java 2009-07-29 17:47:55 UTC (rev 614)
@@ -24,7 +24,7 @@
* Mostly copied from
* jboss-as-5.x/testsuite/src/main/org/jboss/test/profileservice/test
*/
-public class RepeatedDeploymentViaPSTest extends ProfileServiceTest implements ProgressListener {
+public class RepeatedDeploymentViaPSTest extends ProfileServiceTestUtils implements ProgressListener {
15 years, 5 months
EMBJOPR SVN: r613 - trunk/core/src/test/resources/conf.
by embjopr-commits@lists.jboss.org
Author: nmalki
Date: 2009-07-28 20:12:29 -0400 (Tue, 28 Jul 2009)
New Revision: 613
Modified:
trunk/core/src/test/resources/conf/bootstrap-beans.xml
Log:
Modified: trunk/core/src/test/resources/conf/bootstrap-beans.xml
===================================================================
--- trunk/core/src/test/resources/conf/bootstrap-beans.xml 2009-07-29 00:04:35 UTC (rev 612)
+++ trunk/core/src/test/resources/conf/bootstrap-beans.xml 2009-07-29 00:12:29 UTC (rev 613)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<!--
~ Embedded Jopr Project
~ Copyright (C) 2006-2009 Red Hat, Inc.
~ All rights reserved.
15 years, 5 months
EMBJOPR SVN: r611 - in trunk/core/src/main: webapp/WEB-INF and 2 other directories.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2009-07-28 18:23:19 -0400 (Tue, 28 Jul 2009)
New Revision: 611
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/ui/FacesOutcomes.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java
trunk/core/src/main/webapp/WEB-INF/pages.xml
trunk/core/src/main/webapp/include/resourceDataScroller.xhtml
trunk/core/src/main/webapp/secure/categorySummary.xhtml
trunk/core/src/main/webapp/secure/repeatNav.xhtml
Log:
some minor refactoring (renaming of variables etc.) while investigating https://jira.jboss.org/jira/browse/EMBJOPR-197; also added a commented-out a4j:log tag on resourceDataScroller.xhtml that can be uncommented to further debug EMBJOPR-197
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/FacesOutcomes.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/FacesOutcomes.java 2009-07-28 18:43:52 UTC (rev 610)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/FacesOutcomes.java 2009-07-28 22:23:19 UTC (rev 611)
@@ -47,9 +47,9 @@
*/
public static final String ROOT = "root";
/**
- * action outcome indicating that a category summary table should be displayed
+ * action outcome indicating that a subCategory summary table should be displayed
*/
- public static final String CATEGORY_TABLE = "table";
+ public static final String SUB_CATEGORY = "subCategory";
/**
* action outcome indicating that the navigation should simply be repeated
*/
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java 2009-07-28 18:43:52 UTC (rev 610)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java 2009-07-28 22:23:19 UTC (rev 611)
@@ -55,7 +55,12 @@
import org.jboss.on.embedded.ui.nav.SubCategoryTreeNode;
/**
- * blah
+ * The Seam component that backs all three Summary tab pages:
+ * <ul>
+ * <li>/secure/resourceInstanceSummary.xhtml
+ * <li>/secure/resourceTypeSummary.xhtml
+ * <li>/secure/categorySummary.xhtml
+ * </ul>
*
* @author Jessica Sant
*/
@@ -67,11 +72,10 @@
private transient FacesMessages facesMessages;
/**
- * the category that was selected based on the path request parameter
+ * the subCategory that was selected based on the path request parameter
*/
- // TODO should be renamed categoryNode or subCategoryNode
- @Out(required = false)
- private SubCategoryTreeNode category;
+ @Out(required = false, scope = ScopeType.PAGE)
+ private SubCategoryTreeNode subCategory;
/**
* the resourceType that was selected based on the path request parameter
@@ -197,12 +201,12 @@
String outcome = FacesOutcomes.REPEAT_NAV;
if (!this.selectedNode.isLeaf())
{
- outcome = FacesOutcomes.CATEGORY_TABLE;
+ outcome = FacesOutcomes.SUB_CATEGORY;
outcome = addResourcesToList(outcome, this.selectedNode);
}
- // whatever happens make sure we set the categoryNode
- SummaryAction.this.category = this.selectedNode;
+ // Whatever happens, make sure we set the subCategory field.
+ SummaryAction.this.subCategory = this.selectedNode;
return outcome;
}
@@ -304,7 +308,7 @@
public SubCategoryTreeNode getSubCategoryNode()
{
- return category;
+ return subCategory;
}
@@ -334,7 +338,7 @@
{
SubCategoryTreeNode subCatTreeNode = (SubCategoryTreeNode)selectedNode;
addResourcesToList("", subCatTreeNode);
- this.category = subCatTreeNode;
+ this.subCategory = subCatTreeNode;
}
}
FacesContext.getCurrentInstance().renderResponse();
Modified: trunk/core/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/pages.xml 2009-07-28 18:43:52 UTC (rev 610)
+++ trunk/core/src/main/webapp/WEB-INF/pages.xml 2009-07-28 22:23:19 UTC (rev 611)
@@ -54,7 +54,7 @@
<rule if-outcome="repeatNav">
<render view-id="/secure/repeatNav.xhtml"/>
</rule>
- <rule if-outcome="table">
+ <rule if-outcome="subCategory">
<render view-id="/secure/categorySummary.xhtml"/>
</rule>
<rule if-outcome="root">
Modified: trunk/core/src/main/webapp/include/resourceDataScroller.xhtml
===================================================================
--- trunk/core/src/main/webapp/include/resourceDataScroller.xhtml 2009-07-28 18:43:52 UTC (rev 610)
+++ trunk/core/src/main/webapp/include/resourceDataScroller.xhtml 2009-07-28 22:23:19 UTC (rev 611)
@@ -128,7 +128,11 @@
<f:selectItems value="#{tableManager.pageSizes}"/>
</h:selectOneListbox>
</h:panelGroup>
+
+ <a4j:log rendered="false" popup="false" level="ALL" style="width: 800px; height: 400px;"/>
+
</ui:composition>
+
</f:view>
</body>
Modified: trunk/core/src/main/webapp/secure/categorySummary.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/categorySummary.xhtml 2009-07-28 18:43:52 UTC (rev 610)
+++ trunk/core/src/main/webapp/secure/categorySummary.xhtml 2009-07-28 22:23:19 UTC (rev 611)
@@ -33,7 +33,7 @@
<f:view>
<ui:composition template="/layout.xhtml">
- <ui:define name="pagetitle">#{category.subCategory.name}</ui:define>
+ <ui:define name="pagetitle">#{subCategory.subCategory.name}</ui:define>
<ui:define name="tabmenu">
<ui:include src="/include/tabMenu.xhtml">
<ui:param name="activeTab" value="summary"/>
@@ -47,7 +47,7 @@
<ui:include src="../include/displayGlobalMessages.xhtml"/>
<div class="instructionalText">
- #{category.subCategory.description}
+ #{subCategory.subCategory.description}
</div>
<div class="actionHeader">
<div class="floatright">
@@ -138,7 +138,7 @@
</h:form>
</div>
</ui:define>
- </ui:composition>
+ </ui:composition>
</f:view>
</body>
</html>
Modified: trunk/core/src/main/webapp/secure/repeatNav.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/repeatNav.xhtml 2009-07-28 18:43:52 UTC (rev 610)
+++ trunk/core/src/main/webapp/secure/repeatNav.xhtml 2009-07-28 22:23:19 UTC (rev 611)
@@ -31,14 +31,14 @@
<f:view>
<ui:composition template="/layout.xhtml">
- <ui:define name="pagetitle">#{category.subCategory.name}</ui:define>
+ <ui:define name="pagetitle">#{subCategory.subCategory.name}</ui:define>
<ui:define name="body">
<div class="noborderbox">
<ui:include src="../include/displayGlobalMessages.xhtml"/>
<div style="width:100%;">
- #{category.subCategory.description}
+ #{subCategory.subCategory.description}
<hr style="border: 0px; border-bottom: 1px solid #eff2f4; "/>
</div>
@@ -46,7 +46,7 @@
<div class="sectionalLinks">
<ol>
<!-- display all child categories/resource types -->
- <ui:repeat value="#{category.childNodesAsList}" var="childNode">
+ <ui:repeat value="#{subCategory.childNodesAsList}" var="childNode">
<li>
<s:link view="/secure/summary.xhtml">#{childNode.name}
<f:param name="path" value="#{childNode.path}"/>
15 years, 5 months