Author: ozizka(a)redhat.com
Date: 2009-12-07 12:35:32 -0500 (Mon, 07 Dec 2009)
New Revision: 860
Added:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DeployableTypeInfo.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DeployableTypeInfos.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/NamedLabels.java
Removed:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstantsLoaded.java
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as4/WarTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ApplicationsPageTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarStressTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb20Test.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb30Test.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/rar/RarTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/EmbWarTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/hbn/HibernateTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheInterceptorTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
Log:
TS matches all AS/EAP / JOPR combinations - JBQA-2774 and JBQA-2770.
Rewritten to load the strings dynamically - which needed to replace the constants with the
NamedLabels object.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-12-07
15:37:00 UTC (rev 859)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -25,39 +25,21 @@
public interface AppConstants extends EmbJoprTestConstants {
-
- public enum ResourceTypes {
-
- }
+
/**
* Information about deployable types -
* navigation tree labels, archive extensions,
* XML descriptor suffixes, and MIME type.
*/
- public enum DeployableTypes {
+ public enum DeployableTypesX {
- // Nav tree link label, EmbJopr display name, testdata/$dir, extension, suffix, mime
type.
- EAR(AppConstants.NAV_EAR, "EARs", "ear",
".ear", null, "application/ear"),
- //EAR( AppConstantsLoaded.getLabels().get("NAV_EAR"), "EARs",
"ear", ".ear", null, "application/ear"),
- WAR(AppConstants.NAV_WAR, "WARs ", "war",
".war", null, "application/war"),
- EJB2(AppConstants.NAV_EJB2, "EJB2 JARs", "ejb2",
".jar", null, "application/java-archive"),
- EJB3(AppConstants.NAV_EJB3, "EJB3 JARs", "ejb3",
".jar", null, "application/java-archive"),
- SAR(AppConstants.NAV_SAR, "SARs", "sar",
".sar", "-service.xml", "application/sar"),
- RAR(AppConstants.NAV_RAR, "RARs", "rar",
".rar", null, "application/rar"),
- EMB_RAR(AppConstants.NAV_EMB_RAR, "Embedded RARs", "",
".rar", null, "application/rar"),
- MC_BEAN(AppConstants.NAV_MC, "?", "mc",
"", null, "application/java-archive"),
- EMB_WAR(AppConstants.NAV_EMB_WAR, "Embbedded WARs", "",
".war", null, "application/war"),
// TODO: Create a superclass for non-app resource types - ResourceTypes.
- JBCACHE(AppConstants.NAV_JBCACHE, "JBoss Caches", "jbcache",
null, null, null),
- HBN(AppConstants.NAV_HBN, "Hibernate", "hbn",
null, null, null);
+ XJBCACHE(AppConstants.NAV_JBCACHE, "JBoss Caches", "jbcache",
null, null, null),
+ XHBN(AppConstants.NAV_HBN, "Hibernate", "hbn",
null, null, null);
- static{
- EJB2.jmxMBeanNameFormat =
"jboss.j2ee:module=\"%s\",service=EjbModule,*";
- EJB3.jmxMBeanNameFormat = "jboss.j2ee:ear=%1$s,jar=%1$s,service=EJB3";
- }
private String jmxMBeanNameFormat;
private void setJmxMBeanNameFormat( String name ){ this.jmxMBeanNameFormat = name; }
@@ -95,7 +77,7 @@
// -- Constructors --
- private DeployableTypes(
+ private DeployableTypesX(
String navTreeLabel,
String displayName,
String dataDir,
@@ -125,6 +107,7 @@
// Navigation
+ /*
public static final String NAV_APPLICATIONS = "Applications";
//public static final String NAV_EJB = "EJB Application (EJB JAR)s";
public static final String NAV_EJB2 = "EJB2 JARs";
@@ -140,6 +123,20 @@
public static final String NAV_EMB_WAR = "Embedded Web Application
(WAR)s";
public static final String NAV_EMB_RAR = "Embedded Resource Adapter Archive
(RAR)s";
+ /* No way... static initialization order is undefined, can cause a NPE.
+ public static final String NAV_APPLICATIONS =
AppConstantsLoaded.getLabels().get("NAV_APPLICATIONS");;
+ public static final String NAV_EJB2 =
AppConstantsLoaded.getLabels().get("NAV_EJB2");
+ public static final String NAV_EJB3 =
AppConstantsLoaded.getLabels().get("NAV_EJB3");
+ public static final String NAV_EAR =
AppConstantsLoaded.getLabels().get("NAV_EAR");
+ public static final String NAV_SAR =
AppConstantsLoaded.getLabels().get("NAV_SAR");
+ public static final String NAV_MC =
AppConstantsLoaded.getLabels().get("NAV_MC");
+ public static final String NAV_PAR =
AppConstantsLoaded.getLabels().get("NAV_PAR");
+ public static final String NAV_RAR =
AppConstantsLoaded.getLabels().get("NAV_RAR");
+ public static final String NAV_WAR =
AppConstantsLoaded.getLabels().get("NAV_WAR");
+ public static final String NAV_EMB_WAR =
AppConstantsLoaded.getLabels().get("NAV_EMB_WAR");
+ public static final String NAV_EMB_RAR =
AppConstantsLoaded.getLabels().get("NAV_EMB_RAR");
+ /**/
+
// Non-app resource types.
public static final String NAV_SBM = "Service Binding Manager";
public static final String NAV_SBM_SETS = "Service Binding Sets";
Deleted: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstantsLoaded.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstantsLoaded.java 2009-12-07
15:37:00 UTC (rev 859)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstantsLoaded.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -1,25 +0,0 @@
-
-package org.jboss.jopr.jsfunit;
-
-import org.apache.log4j.*;
-
-
-/**
- *
- * @author Ondrej Zizka
- */
-public class AppConstantsLoaded {
-
- private static Labels labels;
- public static Labels getLabels() { return labels; }
-
-
- static {
- try {
- AppConstantsLoaded.labels = Labels.createDefault();
- } catch (Exception ex) {
- Logger.getLogger(AppConstantsLoaded.class).error(ex);
- }
- }
-
-}// class
Added: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DeployableTypeInfo.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DeployableTypeInfo.java
(rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DeployableTypeInfo.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -0,0 +1,68 @@
+
+package org.jboss.jopr.jsfunit;
+
+/**
+ *
+ * @author Ondrej Zizka
+ */
+public class DeployableTypeInfo {
+
+
+ // -- Fields --
+
+ protected final String navTreeLabel;
+ public String getNavTreeLabel() { return navTreeLabel; }
+
+ protected final String displayName;
+ public String getDisplayName() { return displayName; }
+
+ protected final String dataDir;
+ public String getDataDir() { return dataDir; }
+
+ protected final String extension;
+ public String getExtension() { return extension; }
+
+ protected final String suffix;
+ public String getSuffix() { return suffix; }
+
+ protected final String mimeType;
+ public String getMimeType() { return mimeType; }
+
+ private String jmxMBeanNameFormat;
+ void setJmxMBeanNameFormat( String name ){ this.jmxMBeanNameFormat = name; }
+ public String getJmxMBeanNameFormat(){ return this.jmxMBeanNameFormat; }
+ public String formatJmxMBeanName( String deployableName ){
+ if( null == this.jmxMBeanNameFormat )
+ throw new UnsupportedOperationException("JMX name for
"+this.toString()+" is not filled (yet).");
+ return String.format(this.jmxMBeanNameFormat, deployableName);
+ }
+
+ private final String name;
+ public String name() { return name; }
+
+
+
+ // -- Constructors --
+
+ DeployableTypeInfo(
+ String name,
+ String navTreeLabel,
+ String displayName,
+ String dataDir,
+ String extension,
+ String suffix,
+ String mimeType
+ )
+ {
+ this.name = name;
+ this.navTreeLabel = navTreeLabel;
+ this.displayName = displayName;
+ this.dataDir = dataDir;
+ this.extension = extension;
+ this.suffix = suffix;
+ this.mimeType = mimeType;
+ this.jmxMBeanNameFormat = null;
+ }
+
+
+}// class
Added: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DeployableTypeInfos.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DeployableTypeInfos.java
(rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DeployableTypeInfos.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -0,0 +1,68 @@
+
+package org.jboss.jopr.jsfunit;
+
+import java.lang.reflect.Array;
+import java.util.Arrays;
+
+
+
+
+/**
+ *
+ * @author Ondrej Zizka
+ */
+public class DeployableTypeInfos {
+
+ // -- SINGLETON -- //
+ private static DeployableTypeInfos INSTANCE;
+ public static DeployableTypeInfos getInstance(){
+ if( null == INSTANCE )
+ INSTANCE = new DeployableTypeInfos();
+ return INSTANCE;
+ }
+ public static DeployableTypeInfos $(){ return getInstance(); }
+
+
+
+ /** Because labels are now loaded dynamically, we can't use the DeployableTypes
enum. This will replace it. */
+
+ //public final DeployableTypes2 EAR = new DeployableTypes2();
+ public final DeployableTypeInfo EAR;
+ public final DeployableTypeInfo WAR;
+ public final DeployableTypeInfo EJB2;
+ public final DeployableTypeInfo EJB3;
+ public final DeployableTypeInfo SAR;
+ public final DeployableTypeInfo RAR;
+ public final DeployableTypeInfo EMB_RAR;
+ public final DeployableTypeInfo MC_BEAN;
+ public final DeployableTypeInfo EMB_WAR;
+ public final DeployableTypeInfo JBCACHE;
+ public final DeployableTypeInfo HBN;
+
+ public DeployableTypeInfos() {
+ NamedLabels labels = NamedLabels.getInstance();
+
+ EAR = new DeployableTypeInfo( "EAR", labels.NAV_EAR,
"EARs", "ear", ".ear", null,
"application/ear");
+ WAR = new DeployableTypeInfo( "WAR", labels.NAV_WAR,
"WARs ", "war", ".war", null,
"application/war");
+ EJB2 = new DeployableTypeInfo( "EJB2", labels.NAV_EJB2, "EJB2
JARs", "ejb2", ".jar", null,
"application/java-archive");
+ EJB3 = new DeployableTypeInfo( "EJB3", labels.NAV_EJB3, "EJB3
JARs", "ejb3", ".jar", null,
"application/java-archive");
+ SAR = new DeployableTypeInfo( "SAR", labels.NAV_SAR,
"SARs", "sar", ".sar",
"-service.xml", "application/sar");
+ RAR = new DeployableTypeInfo( "RAR", labels.NAV_RAR,
"RARs", "rar", ".rar", null,
"application/rar");
+ EMB_RAR = new DeployableTypeInfo( "EMB_RAR", labels.NAV_EMB_RAR,
"Embedded RARs", "", ".rar", null,
"application/rar");
+ MC_BEAN = new DeployableTypeInfo( "MC_BEAN", labels.NAV_MC,
"?", "mc", "", null,
"application/java-archive");
+ EMB_WAR = new DeployableTypeInfo( "EMB_WAR", labels.NAV_EMB_WAR,
"Embbedded WARs", "", ".war", null,
"application/war");
+ JBCACHE = new DeployableTypeInfo( "JBCACHE", labels.NAV_JBCACHE, "JBoss
Caches", "jbcache", null, null, null);
+ HBN = new DeployableTypeInfo( "HBN", labels.NAV_HBN,
"Hibernate", "hbn", null, null, null);
+ // Remember to add the new ones to the values().
+
+ EJB2.setJmxMBeanNameFormat("jboss.j2ee:module=\"%s\",service=EjbModule,*");
+ EJB3.setJmxMBeanNameFormat("jboss.j2ee:ear=%1$s,jar=%1$s,service=EJB3");
+ }
+
+
+ public Iterable<DeployableTypeInfo> values() {
+ DeployableTypeInfo[] ret = new DeployableTypeInfo[]{EAR, WAR, EJB2, EJB3, SAR, RAR,
EMB_RAR, MC_BEAN, EMB_WAR, JBCACHE, HBN };
+ return Arrays.asList(ret);
+ }
+
+}// class
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -103,7 +103,7 @@
// Click the nav tree.
- String linkLabel = AppConstants.NAV_WAR;
+ String linkLabel = ejtt.labels.NAV_WAR;
//HtmlAnchor warLink = getNavTreeLink(linkLabel);
HtmlAnchor warLink = ejtt.navTree.getNodeLink(linkLabel);
warLink.click();
@@ -143,7 +143,7 @@
HtmlButtonInput deleteButton = getDeleteButton(DEPLOYABLE_NAME);
deleteButton.click();*/
- ejtt.deployment.undeployViaEmbJopr(AppConstants.DeployableTypes.WAR, DEPLOYABLE_NAME);
+ ejtt.deployment.undeployViaEmbJopr(DeployableTypeInfos.getInstance().WAR,
DEPLOYABLE_NAME);
assertFalse(isWarDeployed(DEPLOYABLE_NAME));
}
Copied: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/NamedLabels.java (from rev 856,
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstantsLoaded.java)
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/NamedLabels.java
(rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/NamedLabels.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -0,0 +1,78 @@
+
+package org.jboss.jopr.jsfunit;
+
+import org.apache.log4j.*;
+
+
+/**
+ *
+ * @author Ondrej Zizka
+ */
+public class NamedLabels /* Singleton */
+{
+ private static final Logger log = Logger.getLogger(NamedLabels.class);
+
+
+ // -- SINGLETON -- //
+ private static NamedLabels INSTANCE;
+ public static NamedLabels getInstance(){
+ if( null == INSTANCE )
+ INSTANCE = new NamedLabels();
+ return INSTANCE;
+ }
+
+
+
+ /** Made static field to have the labels loaded during classloading.
+ * This way, we don't have to change the constants references throughout the whole
code.
+ * TODO: We will have to do it sometime anyway. (?)
+ */
+ public Labels getLabels() { return labels; }
+ private Labels labels;
+
+ public final String NAV_APPLICATIONS;
+ public final String NAV_EJB2;
+ public final String NAV_EJB3;
+ public final String NAV_EAR;
+ public final String NAV_SAR;
+ public final String NAV_MC;
+ public final String NAV_PAR;
+ public final String NAV_RAR;
+ public final String NAV_WAR;
+ public final String NAV_EMB_WAR;
+ public final String NAV_EMB_RAR;
+ public final String NAV_JBCACHE;
+ public final String NAV_HBN;
+
+
+ // Const
+
+ /** Creates a Labels object and loads few strings to the named constants. */
+ public NamedLabels() {
+ try {
+ labels = Labels.createDefault();
+ } catch (Exception ex) {
+ log.error(ex);
+ }
+
+ NAV_APPLICATIONS = this.getLabels().get("NAV_APPLICATIONS");
+ NAV_EJB2 = this.getLabels().get("NAV_EJB2");
+ NAV_EJB3 = this.getLabels().get("NAV_EJB3");
+ NAV_EAR = this.getLabels().get("NAV_EAR");
+ NAV_SAR = this.getLabels().get("NAV_SAR");
+ NAV_MC = this.getLabels().get("NAV_MC");
+ NAV_PAR = this.getLabels().get("NAV_PAR");
+ NAV_RAR = this.getLabels().get("NAV_RAR");
+ NAV_WAR = this.getLabels().get("NAV_WAR");
+ NAV_EMB_WAR = this.getLabels().get("NAV_EMB_WAR");
+ NAV_EMB_RAR = this.getLabels().get("NAV_EMB_RAR");
+ NAV_JBCACHE = this.getLabels().get("NAV_JBCACHE");
+ NAV_HBN = this.getLabels().get("NAV_HBN");
+
+ }
+
+
+
+
+
+}// class
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as4/WarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as4/WarTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as4/WarTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -35,7 +35,7 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
-import org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit;
import org.jboss.mx.util.MBeanServerLocator;
@@ -59,8 +59,10 @@
public void XtestBasicWarDeployment() throws IOException, EmbJoprTestException
{
+ final EmbJoprTestToolkit ejtt = new EmbJoprTestToolkit(client, server);
+
// click the nave tree
- HtmlAnchor warLink = getNavTreeLink(NAV_WAR);
+ HtmlAnchor warLink = getNavTreeLink(ejtt.labels.NAV_WAR);
warLink.click();
// click on the "Add new resource" button
@@ -100,7 +102,7 @@
}
finally {
// Undeploy the WAR
- ejtt.deployment.undeployViaEmbJopr(DeployableTypes.WAR, "hellothere.war");
+ ejtt.deployment.undeployViaEmbJopr(ejtt.deployableTypes.WAR,
"hellothere.war");
// This assert doesn't work. jopr does remove the WAR, but for some
// reason, JBoss doesn't undeploy the MBeans
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ApplicationsPageTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ApplicationsPageTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ApplicationsPageTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -27,11 +27,9 @@
import java.util.*;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
+import org.jboss.jopr.jsfunit.DeployableTypeInfo;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
-import org.jboss.jopr.jsfunit.util.ActiveConditionChecker;
-import org.jboss.jopr.jsfunit.util.DescribedCondition;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
@@ -60,7 +58,7 @@
ejtt.sleep(2000);
// Navigate to apps summary tab
- NavTreeNode appsNode = ejtt.navTree.getNodeByLabel(NAV_APPLICATIONS);
+ NavTreeNode appsNode = ejtt.navTree.getAppsNode();
assertNotNull(appsNode);
appsNode.click();
ejtt.tabMenu.clickTab("Summary");
@@ -100,14 +98,14 @@
for (int i = 0; i < DEPLOYED_WARS_COUNT; i++) {
String fileDestPath = destDir+"/appPagination"+i+".war";
FileUtils.copyFile( new File(fileSrcPath), new File(fileDestPath) );
- ejtt.deployment.deployViaEmbJoprRepeatedly( DeployableTypes.WAR, fileDestPath );
+ ejtt.deployment.deployViaEmbJoprRepeatedly( ejtt.deployableTypes.WAR, fileDestPath
);
succesfullyDeployed = i+1;
}
// Navigate to apps summary tab
- NavTreeNode appsNode = ejtt.navTree.getNodeByLabel(NAV_APPLICATIONS);
+ NavTreeNode appsNode = ejtt.navTree.getAppsNode();
assertNotNull(appsNode);
appsNode.click();
ejtt.tabMenu.clickTab("Summary");
@@ -163,7 +161,7 @@
for (int i = 0; i < succesfullyDeployed; i++) {
String deployableName = "appPagination"+i+".war";
try {
- ejtt.deployment.undeployViaEmbJopr( DeployableTypes.WAR, deployableName );
+ ejtt.deployment.undeployViaEmbJopr( ejtt.deployableTypes.WAR, deployableName );
}
catch( EmbJoprTestException ex ){
log.error("Exception during undeployment of
'"+deployableName+"': "+ex);
@@ -202,12 +200,12 @@
for (int i = 0; i < 8; i++) {
String fileDestPath = destDir+"/testAppsListing"+i+".war";
FileUtils.copyFile( new File(fileSrcPath), new File(fileDestPath) );
- ejtt.deployment.deployViaEmbJoprRepeatedly( DeployableTypes.WAR, fileDestPath );
+ ejtt.deployment.deployViaEmbJoprRepeatedly( ejtt.deployableTypes.WAR, fileDestPath );
}
// Navigate to apps summary tab
- NavTreeNode appsNode = ejtt.navTree.getNodeByLabel(NAV_APPLICATIONS);
+ NavTreeNode appsNode = ejtt.navTree.getAppsNode();
assertNotNull(appsNode);
appsNode.click();
ejtt.tabMenu.clickTab("Summary");
@@ -257,9 +255,14 @@
* Determines the type of the deployable based on the value
* in the Type column in EmbJopr.
*/
- public DeployableTypes parseDeployableType( String desc ) throws EmbJoprTestException
+ public DeployableTypeInfo parseDeployableType( String desc ) throws
EmbJoprTestException
{
- for( DeployableTypes type : DeployableTypes.values() ){
+ /*DeployableTypeInfo dti = ejtt.deployableTypeInfos.getByName( desc );
+ if( null == dti )
+ throw new EmbJoprTestException("Unrecognized deployable type: "+desc);
+ return dti; */
+
+ for( DeployableTypeInfo type : ejtt.deployableTypes.values() ){
if( desc.toUpperCase().contains( type.name() )){
return type;
}
@@ -271,9 +274,9 @@
* Determines the type of the deployable using the value
* in the Name column in EmbJopr's Summary tab.
*/
- public DeployableTypes determineDeployableTypeFromName( String name ) throws
EmbJoprTestException
+ public DeployableTypeInfo determineDeployableTypeFromName( String name ) throws
EmbJoprTestException
{
- for( DeployableTypes type : DeployableTypes.values() ){
+ for( DeployableTypeInfo type : ejtt.deployableTypes.values() ){
if( StringUtils.endsWith(name, type.getSuffix() ) ) return type;
if( StringUtils.endsWith(name, type.getExtension() ) ) return type;
}
@@ -289,12 +292,12 @@
class ApplicationInfo {
private String name;
- private DeployableTypes type;
+ private DeployableTypeInfo type;
public String getName() { return name; }
- public DeployableTypes getType() { return type; }
+ public DeployableTypeInfo getType() { return type; }
- public ApplicationInfo(String name, DeployableTypes type) {
+ public ApplicationInfo(String name, DeployableTypeInfo type) {
this.name = name;
this.type = type;
}
@@ -330,7 +333,7 @@
class ApplicationsPool {
private List<ApplicationInfo> apps = new ArrayList();
- private Map<DeployableTypes, List<ApplicationInfo>> mapAppsByType = new
HashMap();
+ private Map<DeployableTypeInfo, List<ApplicationInfo>> mapAppsByType = new
HashMap();
public void add( ApplicationInfo app ){
// Add to the list of all apps.
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarStressTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarStressTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarStressTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -28,7 +28,6 @@
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.lang.math.RandomUtils;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.exceptions.*;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
@@ -43,24 +42,29 @@
*/
public class EarStressTest extends ApplicationTestBaseAS5 {
- public static final DeployableTypes APP_TYPE = DeployableTypes.EAR;
+ public DeployableTypeInfo APP_TYPE;
/**
- * @return the suite of tests being tested
- */
+ * @return the suite of tests being tested
+ */
public static Test suite(){
return new TestSuite(EarStressTest.class);
}
- public EarStressTest() {
- }
+ public EarStressTest() {}
private EarStressTest(String testToRun) {
super(testToRun);
}
+ @Override
+ public void setUp() throws IOException, EmbJoprTestException {
+ super.setUp();
+ APP_TYPE = ejtt.deployableTypes.EAR;
+ }
+
/**
@@ -115,7 +119,7 @@
log.info("Deploying: "+earFilePath);
// Navigate to Enterprise Archives
- ejtt.getNavTree().getNodeLink(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
// click on the "Add new resource" button
client.click("actionHeaderForm:addNewContent"); // 404 if
setThrowExceptionOnFailingStatusCode(true) above
@@ -135,7 +139,7 @@
{
// Navigate to Enterprise Archives
- ejtt.getNavTree().getNodeLink(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ejtt.getTabMenu().clickSummaryTab();
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -37,7 +37,6 @@
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.lang.math.RandomUtils;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.exceptions.*;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
import org.jboss.jopr.jsfunit.util.hmlunit.HtmlPageBumper;
@@ -54,7 +53,7 @@
*/
public class EarTest extends ApplicationTestBaseAS5 {
- public static final DeployableTypes APP_TYPE = DeployableTypes.EAR;
+ public DeployableTypeInfo APP_TYPE;
@@ -77,8 +76,13 @@
}
}
- public EarTest() {
+ @Override
+ public void setUp() throws IOException, EmbJoprTestException {
+ super.setUp();
+ APP_TYPE = ejtt.deployableTypes.EAR;
}
+
+ public EarTest() {}
private EarTest(String testToRun) {
super(testToRun);
}
@@ -343,7 +347,7 @@
final String DEPLOYABLE_NAME = BASIC_EAR;
// Go back to applications Sumary screen.
- ejtt.getNavTree().getNodeByLabel(NAV_APPLICATIONS).click();
+ ejtt.getNavTree().getAppsNode().click();
try {
// Deploy the EAR.
@@ -351,7 +355,7 @@
//deployEar( earFilePath );
ejtt.deployment.deployViaEmbJopr(APP_TYPE, earFilePath);
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ContentTableRow earRow =
ejtt.getDefaultContentTable().getFirstRowContainingLink(DEPLOYABLE_NAME);
assertTrue("Page doesn't list "+DEPLOYABLE_NAME+" in Summary
tab.", earRow != null );
@@ -363,7 +367,7 @@
ejtt.getTabMenu().getTabContentBox().getElement().getTextContent().contains(DEPLOYABLE_NAME)
);
// Go to the summary through nav tree node.
- NavTreeNode earNode = ejtt.getNavTree().getNodeByLabel(NAV_EAR);
+ NavTreeNode earNode = ejtt.getNavTree().getEarNode();
if( !earNode.isExpanded() ){
log.info("Expanding.");
earNode.getArrowLink().click();
@@ -468,7 +472,7 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ejtt.deployment.waitActivelyForDeployment(APP_TYPE, BASIC_EAR, 3000, 15);
// Navigate to the Configuration tab
@@ -530,7 +534,7 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ejtt.deployment.waitActivelyForDeployment(APP_TYPE, BASIC_EAR, 3000, 15);
// Navigate to the Configuration tab
@@ -593,7 +597,7 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ejtt.deployment.waitActivelyForDeployment(APP_TYPE, DEPLOYABLE_NAME, 3000, 15);
// Navigate to the Configuration tab
@@ -636,7 +640,7 @@
try {
// Wait for EAR to be deployed and UP
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ejtt.deployment.waitActivelyForDeployment(APP_TYPE, BASIC_EAR, 3000, 15);
ContentTable table =
ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Resource Traits");
@@ -769,7 +773,7 @@
ejtt.deployment.waitActivelyForDeployment( APP_TYPE, EAR_UNPACKED, 5000, 35, this);
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ContentTableRow earRow =
ejtt.getDefaultContentTable().getFirstRowContainingLink(EAR_UNPACKED);
@@ -1095,7 +1099,7 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ejtt.deployment.waitActivelyForDeployment(APP_TYPE, DEPLOYABLE_NAME, 3000, 15);
// Navigate to the Configuration tab
@@ -1161,7 +1165,7 @@
String appFilePath = ejtt.getTestDataDir()
+"/"+APP_TYPE.getDataDir()+"/"+DEPLOYABLE_NAME;
ejtt.deployment.deployViaEmbJopr( APP_TYPE, appFilePath );
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().click();
ejtt.deployment.waitActivelyForDeployment(APP_TYPE, DEPLOYABLE_NAME, 3000, 15);
@@ -1234,9 +1238,9 @@
// Check that the Embedded Rar is listed
log.info("Navigate to Embedded RAR");
- ejtt.navTree.getNodeByLabel(DeployableTypes.EMB_RAR.getNavTreeLabel()).getLabelLink().click();
+ ejtt.navTree.getNodeByLabel(ejtt.deployableTypes.EMB_RAR.getNavTreeLabel()).getLabelLink().click();
log.info("Assert that the Embedded Rar is Available and UP");
- assertTrue( ejtt.deployment.isDeployedAccordingToEmbJopr(DeployableTypes.EMB_RAR,
BASIC_RAR, true) );
+ assertTrue( ejtt.deployment.isDeployedAccordingToEmbJopr(ejtt.deployableTypes.EMB_RAR,
BASIC_RAR, true) );
// Undeploy the EAR.
log.info("Undeploy the EAR");
@@ -1258,7 +1262,8 @@
log.info("Deploying: "+earFilePath);
// Navigate to Enterprise Archives
- ejtt.getNavTree().getNodeLink(NAV_EAR).click();
+ //ejtt.getNavTree().getNodeLink(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().getLabelLink().click();
// click on the "Add new resource" button
client.click("actionHeaderForm:addNewContent"); // 404 if
setThrowExceptionOnFailingStatusCode(true) above
@@ -1280,7 +1285,8 @@
{
// Navigate to Enterprise Archives
- ejtt.getNavTree().getNodeLink(NAV_EAR).click();
+ //ejtt.getNavTree().getNodeLink(NAV_EAR).click();
+ ejtt.getNavTree().getEarNode().getLabelLink().click();
ejtt.getTabMenu().clickSummaryTab();
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb20Test.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb20Test.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb20Test.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -23,9 +23,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.jboss.jopr.jsfunit.DeployableTypeInfo;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
/**
@@ -45,8 +45,8 @@
}
- public DeployableTypes getAppType() {
- return DeployableTypes.EJB2;
+ public DeployableTypeInfo getAppType() {
+ return ejtt.deployableTypes.EJB2;
}
@Override
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb30Test.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb30Test.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb30Test.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -24,10 +24,9 @@
import java.io.IOException;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException;
+import org.jboss.jopr.jsfunit.DeployableTypeInfo;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
@@ -48,8 +47,8 @@
}
- public DeployableTypes getAppType() {
- return DeployableTypes.EJB3;
+ public DeployableTypeInfo getAppType() {
+ return ejtt.deployableTypes.EJB3;
}
@Override
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTestBase.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTestBase.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTestBase.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -30,7 +30,6 @@
import javax.faces.application.FacesMessage;
import junit.framework.Test;
import org.apache.commons.io.FileUtils;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.exceptions.*;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
@@ -43,14 +42,14 @@
*/
public abstract class EjbTestBase extends ApplicationTestBaseAS5 {
- public abstract DeployableTypes getAppType();
+ public abstract DeployableTypeInfo getAppType();
public abstract String getArchiveNameBasic();
public abstract String getArchiveNameGood();
public abstract String getArchiveNameBad();
public abstract String getArchiveNameRedeploy();
- public final DeployableTypes APP_TYPE = this.getAppType();
+ public final DeployableTypeInfo APP_TYPE = this.getAppType();
/**
* @return the suite of tests being tested
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/rar/RarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/rar/RarTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/rar/RarTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -32,9 +32,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.RandomUtils;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.exceptions.*;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
import org.w3c.dom.Node;
@@ -50,7 +48,7 @@
*/
public class RarTest extends ApplicationTestBaseAS5 {
- public static final DeployableTypes APP_TYPE = DeployableTypes.RAR;
+ public DeployableTypeInfo APP_TYPE;
@@ -73,8 +71,13 @@
}
}
- public RarTest() {
+ @Override
+ public void setUp() throws IOException, EmbJoprTestException {
+ super.setUp();
+ APP_TYPE = ejtt.deployableTypes.RAR;
}
+
+ public RarTest() {}
private RarTest(String testToRun) {
super(testToRun);
}
@@ -209,7 +212,7 @@
Exception ex = null;
try {
- ejtt.getNavTree().getNodeByLabel(NAV_RAR).click();
+ ejtt.getNavTree().getRarNode().click();
// FAILS: Can't find the link using...
ContentTableRow rarRow =
ejtt.getDefaultContentTable().getFirstRowContainingLink(BASIC_RAR);
@@ -222,7 +225,7 @@
ejtt.getTabMenu().getTabContentBox().getElement().getTextContent().contains(BASIC_RAR)
);
// Go to the summary through nav tree node.
- NavTreeNode rarNode = ejtt.getNavTree().getNodeByLabel(NAV_RAR);
+ NavTreeNode rarNode = ejtt.getNavTree().getRarNode();
if( !rarNode.isExpanded() ){
log.info("Expanding.");
rarNode.getArrowLink().click();
@@ -272,7 +275,7 @@
new ActiveConditionChecker(new DescribedCondition("RAR appears in Summary tab
list") {
public boolean isTrue() throws Exception {
// Refresh, then check.
- ejtt.getNavTree().getNodeByLabel(NAV_RAR).click();
+ ejtt.getNavTree().getRarNode().click();
ContentTableRow rarRow =
ejtt.getDefaultContentTable().findFirstRowContainingLink(BASIC_RAR);
return null != rarRow;
}
@@ -291,7 +294,7 @@
break;
// Refresh page after 1 second.
- ejtt.getNavTree().getNodeByLabel(NAV_RAR).click();
+ ejtt.getNavTree().getRarNode().click();
rarRow = ejtt.getDefaultContentTable().getFirstRowContainingLink(BASIC_RAR);
// We don't want an infinite loop by mistake.
@@ -414,7 +417,7 @@
log.info("Deploying: "+rarFilePath);
// Navigate to Enterprise Archives
- ejtt.getNavTree().getNodeLink(NAV_RAR).click();
+ ejtt.getNavTree().getRarNode().click();
// click on the "Add new resource" button
client.click("actionHeaderForm:addNewContent"); // 404 if
setThrowExceptionOnFailingStatusCode(true) above
@@ -435,7 +438,7 @@
{
// Navigate to Enterprise Archives
- ejtt.getNavTree().getNodeLink(NAV_RAR).click();
+ ejtt.getNavTree().getRarNode().click();
ejtt.getTabMenu().clickSummaryTab();
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -58,7 +58,7 @@
public static final int DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL = 6000;
public static final int DEPLOY_UP_STATE_WAIT_CHECK_RETRIES = 50;
- public static final DeployableTypes APP_TYPE = DeployableTypes.WAR;
+ public DeployableTypeInfo APP_TYPE;
@@ -69,7 +69,14 @@
return new TestSuite(WarTest.class);
}
+ @Override
+ public void setUp() throws IOException, EmbJoprTestException {
+ super.setUp();
+ APP_TYPE = ejtt.deployableTypes.WAR;
+ }
+
+
/*
* testName: testBasicWarDeployment
* assertion: verify basic deployment of an EJB JAR.
@@ -361,7 +368,7 @@
String filePath = ejtt.getTestDataDir() + "/war/"+DEPLOYABLE_NAME;
deployWarRepeatedly( filePath );
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
+ ejtt.getNavTree().getWarNode().click();
// Get to the app through listing.
log.debug("Looking for row with: "+DEPLOYABLE_NAME);
@@ -379,7 +386,7 @@
// Other way to get to app: through nav tree.
- ejtt.getNavTree().getNodeArrow(NAV_WAR).click();
+ ejtt.getNavTree().getWarNode().getArrowLink().click();
ejtt.navTree.waitUntilNodeLoadedByAjax(DEPLOYABLE_NAME, 500, 15);
ejtt.navTree.getNodeByLabel(DEPLOYABLE_NAME).click();
/**/
@@ -390,7 +397,7 @@
ejtt.getTabMenu().getTabContentBox().getElement().getTextContent().contains(DEPLOYABLE_NAME)
);
// Go to the summary through nav tree node.
- NavTreeNode appNode = ejtt.getNavTree().getNodeByLabel(NAV_WAR);
+ NavTreeNode appNode = ejtt.getNavTree().getWarNode();
if( !appNode.isExpanded() ){
log.info("Expanding.");
appNode.getArrowLink().click();
@@ -436,7 +443,7 @@
new ActiveConditionChecker(new DescribedCondition("WAR appears in Summary tab
list") {
public boolean isTrue() throws Exception {
// Refresh, then check.
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
+ ejtt.getNavTree().getWarNode().click();
ContentTableRow appRow =
ejtt.getDefaultContentTable().findFirstRowContainingLink(DEPLOYABLE_NAME);
return null != appRow;
}
@@ -456,7 +463,7 @@
break;
// Refresh page after 1 second.
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
+ ejtt.getNavTree().getWarNode().click();
appRow = ejtt.getDefaultContentTable().getFirstRowContainingLink(DEPLOYABLE_NAME);
// We don't want an infinite loop by mistake.
@@ -532,8 +539,8 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
+ ejtt.getNavTree().getWarNode().click();
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
// Navigate to the Configuration tab
ContentTableRow appRow =
ejtt.getDefaultContentTable().getFirstRowContainingLink(DEPLOYABLE_NAME);
@@ -594,8 +601,8 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
+ ejtt.getNavTree().getWarNode().click();
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
// Navigate to the Configuration tab
@@ -654,8 +661,8 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
+ ejtt.getNavTree().getWarNode().click();
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
// Navigate to the Configuration tab
ContentTableRow row =
ejtt.getDefaultContentTable().getFirstRowContainingLink(DEPLOYABLE_NAME);
@@ -704,7 +711,7 @@
undeployWAR(DEPLOYABLE_NAME);
//DebugUtils.writeFile("target/DUD-undeploy.html",
client.getPageAsText());///
assertFalse( "Deployable "+DEPLOYABLE_NAME+" shouldn't be listed as
deployed after undeployment.",
- ejtt.deployment.isDeployedAccordingToEmbJopr(DeployableTypes.WAR, DEPLOYABLE_NAME,
false) );
+ ejtt.deployment.isDeployedAccordingToEmbJopr(ejtt.deployableTypes.WAR,
DEPLOYABLE_NAME, false) );
// Deploy the same war again.
log.info("Deploying "+DEPLOYABLE_NAME+" again.");
@@ -712,7 +719,7 @@
//DebugUtils.writeFile("target/DUD-deploy.html",
client.getPageAsText());///
// EMBJOPR-125 here.
assertTrue( "Deployable "+DEPLOYABLE_NAME+" should be listed as
deployed after deployment.",
- ejtt.deployment.isDeployedAccordingToEmbJopr(DeployableTypes.WAR, DEPLOYABLE_NAME,
false) );
+ ejtt.deployment.isDeployedAccordingToEmbJopr(ejtt.deployableTypes.WAR,
DEPLOYABLE_NAME, false) );
}
finally {
@@ -747,13 +754,13 @@
log.info("Undeploying "+DEPLOYABLE_NAME);
undeployWAR(DEPLOYABLE_NAME); // EMBJOPR-109 here
assertFalse( "Deployable "+DEPLOYABLE_NAME+" shouldn't be listed as
deployed after undeployment.",
- ejtt.deployment.isDeployedAccordingToEmbJopr(DeployableTypes.WAR, DEPLOYABLE_NAME,
false) );
+ ejtt.deployment.isDeployedAccordingToEmbJopr(ejtt.deployableTypes.WAR,
DEPLOYABLE_NAME, false) );
// Deploy the same war again.
log.info("Deploying "+DEPLOYABLE_NAME+" again.");
deployWarRepeatedly( appFilePath );
assertTrue( "Deployable "+DEPLOYABLE_NAME+" should be listed as
deployed after deployment.",
- ejtt.deployment.isDeployedAccordingToEmbJopr(DeployableTypes.WAR, DEPLOYABLE_NAME,
false) );
+ ejtt.deployment.isDeployedAccordingToEmbJopr(ejtt.deployableTypes.WAR,
DEPLOYABLE_NAME, false) );
}
finally {
@@ -784,8 +791,8 @@
try {
// Wait for WAR to be deployed and UP
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
+ ejtt.getNavTree().getWarNode().click();
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
// Click the WAR link
ejtt.getTabMenu().getTabContentBox().getFirstTable()
@@ -826,8 +833,8 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
+ ejtt.getNavTree().getWarNode().click();
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
// Navigate to the Metrics tab
ContentTableRow row =
ejtt.getDefaultContentTable().getFirstRowContainingLink(DEPLOYABLE_NAME);
@@ -872,8 +879,8 @@
try {
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
+ ejtt.getNavTree().getWarNode().click();
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
// Navigate to the Metrics tab
@@ -944,11 +951,11 @@
try {
// Loop, wait for the app to appear.
log.info("Waiting for WAR to appear.");
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
+ ejtt.getNavTree().getWarNode().click();
//ContentTableRow row =
ejtt.getDefaultContentTable().getFirstRowContainingLink(WAR_UNPACKED);
if( ! ejtt.deployment.isDeployedAccordingToEmbJopr(APP_TYPE, DEPLOYABLE_NAME) )
@@ -1003,8 +1010,8 @@
try {
// Wait until app is UP
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
+ ejtt.getNavTree().getWarNode().click();
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
// Assert that the app is running.
@@ -1098,8 +1105,8 @@
try {
// Wait until app is UP
- ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.WAR, DEPLOYABLE_NAME,
+ ejtt.getNavTree().getWarNode().click();
+ ejtt.deployment.waitActivelyForDeployment(ejtt.deployableTypes.WAR, DEPLOYABLE_NAME,
DEPLOY_UP_STATE_WAIT_CHECK_INTERVAL, DEPLOY_UP_STATE_WAIT_CHECK_RETRIES, this);
// Assert that the app is running.
@@ -1207,9 +1214,9 @@
deployWAR( appFilePath );
- ejtt.navTree.getNodeByLabel(DeployableTypes.EMB_WAR.getNavTreeLabel()).getLabelLink().click();
+ ejtt.navTree.getNodeByLabel(ejtt.deployableTypes.EMB_WAR.getNavTreeLabel()).getLabelLink().click();
- assertFalse( ejtt.deployment.isDeployedAccordingToEmbJopr(DeployableTypes.EMB_WAR,
DEPLOYABLE_NAME, false) );
+ assertFalse(
ejtt.deployment.isDeployedAccordingToEmbJopr(ejtt.deployableTypes.EMB_WAR,
DEPLOYABLE_NAME, false) );
}
finally {
@@ -1288,7 +1295,7 @@
// Navigate to Enterprise Archives
//ejtt.getNavTree().getNodeLink(NAV_WAR).click();
- ejtt.getNavTree().getNodeLink(AppConstants.DeployableTypes.WAR.getNavTreeLabel()).click();
+ ejtt.getNavTree().getNodeLink(ejtt.deployableTypes.WAR.getNavTreeLabel()).click();
// click on the "Add new resource" button
client.click("actionHeaderForm:addNewContent"); // 404 if
setThrowExceptionOnFailingStatusCode(true) above
@@ -1345,7 +1352,7 @@
// Check whether the WAR is listed in EmbJopr.
log.debug("Looking for listed WAR: "+warFileName);
- boolean listed = ejtt.deployment.isDeployedAccordingToEmbJopr(DeployableTypes.WAR,
warFileName, true);
+ boolean listed =
ejtt.deployment.isDeployedAccordingToEmbJopr(ejtt.deployableTypes.WAR, warFileName,
true);
if( listed )
return true;
else
@@ -1372,7 +1379,7 @@
{
// Navigate to Enterprise Archives
- ejtt.getNavTree().getNodeLink(NAV_WAR).click();
+ ejtt.getNavTree().getWarNode().click();
ejtt.getTabMenu().clickSummaryTab();
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/EmbWarTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/EmbWarTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/embwar/EmbWarTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -4,6 +4,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
+import org.jboss.jopr.jsfunit.DeployableTypeInfo;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.NavTreeNode;
@@ -14,7 +15,7 @@
*/
public class EmbWarTest extends ApplicationTestBaseAS5 {
- public static final DeployableTypes APP_TYPE = DeployableTypes.EMB_WAR;
+ public DeployableTypeInfo APP_TYPE;
/**
* @return the suite of tests being tested
@@ -23,6 +24,14 @@
return new TestSuite(EmbWarTest.class);
}
+ @Override
+ public void setUp() throws IOException, EmbJoprTestException {
+ super.setUp();
+ APP_TYPE = ejtt.deployableTypes.EMB_WAR;
+ }
+
+
+
public void testEarWithEmbWarDeployment() throws IOException, EmbJoprTestException
{
@@ -31,7 +40,7 @@
try {
// Deploy the app.
String appFilePath = ejtt.getTestDataDir() + "/ear/"+DEPLOYABLE_NAME;
- ejtt.deployment.deployViaEmbJopr( DeployableTypes.EAR, appFilePath );
+ ejtt.deployment.deployViaEmbJopr( ejtt.deployableTypes.EAR, appFilePath );
String expectedMessage = DEPLOYABLE_NAME + " created successfully";
checkClientAndServerMessages(expectedMessage, expectedMessage, false);
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/hbn/HibernateTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/hbn/HibernateTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/hbn/HibernateTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -2,6 +2,8 @@
import java.io.IOException;
import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
+import org.jboss.jopr.jsfunit.DeployableTypeInfo;
+import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
import org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException;
/**
@@ -13,10 +15,16 @@
public class HibernateTest extends ApplicationTestBaseAS5 {
- public final DeployableTypes APP_TYPE = DeployableTypes.HBN;
+ public DeployableTypeInfo APP_TYPE;
+ @Override
+ public void setUp() throws IOException, EmbJoprTestException {
+ super.setUp();
+ APP_TYPE = ejtt.deployableTypes.HBN;
+ }
+
public void testHibernateParentNode() throws HtmlElementNotFoundException {
fail("Hibernate not present yet.");
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheInterceptorTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheInterceptorTest.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheInterceptorTest.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -30,7 +30,7 @@
if( isJBossConfigWithoutCache() ) return;
- ejtt.deployment.deployViaEmbJopr( DeployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
+ ejtt.deployment.deployViaEmbJopr( ejtt.deployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
try {
@@ -63,7 +63,7 @@
}
finally {
- ejtt.deployment.undeployViaEmbJopr( DeployableTypes.EAR, JBCACHE_TEST_EAR );
+ ejtt.deployment.undeployViaEmbJopr( ejtt.deployableTypes.EAR, JBCACHE_TEST_EAR );
}
}
@@ -89,7 +89,7 @@
// Deploy an EAR.
- ejtt.deployment.deployViaEmbJopr( DeployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
+ ejtt.deployment.deployViaEmbJopr( ejtt.deployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
try {
@@ -132,7 +132,7 @@
}
finally {
- ejtt.deployment.undeployViaEmbJopr( DeployableTypes.EAR, JBCACHE_TEST_EAR );
+ ejtt.deployment.undeployViaEmbJopr( ejtt.deployableTypes.EAR, JBCACHE_TEST_EAR );
}
}
@@ -152,7 +152,7 @@
resetStatistics();
- ejtt.deployment.deployViaEmbJopr( DeployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
+ ejtt.deployment.deployViaEmbJopr( ejtt.deployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
try {
ejtt.navTree.getNodeByLabel(JBCACHE_HA_PARTITION).expand();
@@ -170,7 +170,7 @@
}
finally {
- ejtt.deployment.undeployViaEmbJopr( DeployableTypes.EAR, JBCACHE_TEST_EAR );
+ ejtt.deployment.undeployViaEmbJopr( ejtt.deployableTypes.EAR, JBCACHE_TEST_EAR );
}
}
@@ -195,7 +195,7 @@
// Deploy an EAR.
- ejtt.deployment.deployViaEmbJopr( DeployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
+ ejtt.deployment.deployViaEmbJopr( ejtt.deployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
try {
@@ -224,7 +224,7 @@
}
finally {
- ejtt.deployment.undeployViaEmbJopr( DeployableTypes.EAR, JBCACHE_TEST_EAR );
+ ejtt.deployment.undeployViaEmbJopr( ejtt.deployableTypes.EAR, JBCACHE_TEST_EAR );
}
}
@@ -252,7 +252,7 @@
// Deploy an EAR.
- ejtt.deployment.deployViaEmbJopr( DeployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
+ ejtt.deployment.deployViaEmbJopr( ejtt.deployableTypes.EAR,
ejtt.getTestFilePath(this.APP_TYPE, JBCACHE_TEST_EAR));
try {
@@ -280,7 +280,7 @@
}
finally {
- ejtt.deployment.undeployViaEmbJopr( DeployableTypes.EAR, JBCACHE_TEST_EAR );
+ ejtt.deployment.undeployViaEmbJopr( ejtt.deployableTypes.EAR, JBCACHE_TEST_EAR );
}
}
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -5,8 +5,8 @@
package org.jboss.jopr.jsfunit.as5.jbcache;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
+import org.jboss.jopr.jsfunit.DeployableTypeInfo;
/**
*
@@ -14,7 +14,7 @@
*/
public class JBossCacheTestBase extends ApplicationTestBaseAS5 {
- public final DeployableTypes APP_TYPE = DeployableTypes.JBCACHE;
+ public DeployableTypeInfo APP_TYPE;
// Cache which is active by default.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-12-07
15:37:00 UTC (rev 859)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-12-07
17:35:32 UTC (rev 860)
@@ -9,7 +9,6 @@
import java.net.UnknownHostException;
import java.util.*;
-import java.util.logging.Level;
import javax.management.MalformedObjectNameException;
import javax.naming.NamingException;
import org.jboss.jopr.jsfunit.exceptions.*;
@@ -36,16 +35,17 @@
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import org.jboss.jopr.jsfunit.AppConstants;
-import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.DebugUtils;
+import org.jboss.jopr.jsfunit.DeployableTypeInfo;
+import org.jboss.jopr.jsfunit.DeployableTypeInfos;
import org.jboss.jopr.jsfunit.EmbJoprTestConstants;
import org.jboss.jopr.jsfunit.EmbjoprTestCase;
+import org.jboss.jopr.jsfunit.NamedLabels;
import org.jboss.jsfunit.jsfsession.*;
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
import org.mozilla.javascript.NativeFunction;
import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
@@ -59,11 +59,16 @@
private static Logger log = Logger.getLogger(EmbJoprTestToolkit.class.getName());
+ public final NamedLabels labels = new NamedLabels();
+ public final DeployableTypeInfos deployableTypes = DeployableTypeInfos.getInstance();
+
+
protected JSFClientSession client;
protected JSFServerSession server;
- private EmbJoprTestToolkit selfEjtt; // For closures.
public JSFClientSession getClient() { return client; }
public JSFServerSession getServer() { return server; }
+ /** For closures. */
+ private EmbJoprTestToolkit selfEjtt;
public EmbJoprTestToolkit(JSFClientSession client, JSFServerSession server) throws
EmbJoprTestException {
@@ -131,7 +136,7 @@
return System.getProperty(AppConstants.SYSPROP_TESTDATA_DIR);
}
- public String getTestFilePath( DeployableTypes location, String fileName ){
+ public String getTestFilePath( DeployableTypeInfo location, String fileName ){
return
this.getTestDataDir()+"/"+location.getDataDir()+"/"+fileName;
}
@@ -320,7 +325,19 @@
+ public NavTreeNode getAppsNode() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV_APPLICATIONS); }
+ public NavTreeNode getEarNode() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV_EAR); }
+ public NavTreeNode getWarNode() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV_WAR); }
+ public NavTreeNode getEmbWarNode() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV_EMB_WAR); }
+ public NavTreeNode getEjb2Node() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV_EJB2); }
+ public NavTreeNode getEjb3Node() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV_EJB3); }
+ public NavTreeNode getRarNode() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV_RAR); }
+ public NavTreeNode getEmbRarNode() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV_EMB_RAR); }
+ //public NavTreeNode getNode() throws HtmlElementNotFoundException { return
getNodeByLabel(labels.NAV); }
+
+
+
/**
* Finds the nav tree node by it's link label.
*
@@ -2188,7 +2205,7 @@
/**
* Makes an MBean name and checks via JMX whether it is deployed.
*/
- public boolean isDeployedAccordingToJMX( AppConstants.DeployableTypes type, String
deployableName )
+ public boolean isDeployedAccordingToJMX( DeployableTypeInfo type, String deployableName
)
throws EmbJoprTestException, IOException
{
// Get the MBean name.
@@ -2250,7 +2267,7 @@
*
* @param type Type of the deployable - EAR, SAR, WAR, ...
*/
- public void deployViaEmbJopr( AppConstants.DeployableTypes type, String filePath )
+ public void deployViaEmbJopr( DeployableTypeInfo type, String filePath )
throws IOException, HtmlElementNotFoundException
{
if( !(new File(filePath)).exists())
@@ -2276,12 +2293,12 @@
- public void deployViaEmbJoprRepeatedly( final AppConstants.DeployableTypes type, final
String filePath ) throws IOException, HtmlElementNotFoundException, EmbJoprTestException
{
+ public void deployViaEmbJoprRepeatedly( final DeployableTypeInfo type, final String
filePath ) throws IOException, HtmlElementNotFoundException, EmbJoprTestException {
deployViaEmbJoprRepeatedly( type, filePath, 5000, 8 );
}
- public void deployViaEmbJoprRepeatedly( final AppConstants.DeployableTypes type, final
String filePath, int interval, int repeats )
+ public void deployViaEmbJoprRepeatedly( final DeployableTypeInfo type, final String
filePath, int interval, int repeats )
throws IOException, HtmlElementNotFoundException, EmbJoprTestException
{
@@ -2341,7 +2358,7 @@
*
* @param type Type of the deployable - EAR, SAR, WAR, ...
*/
- public void undeployViaEmbJopr( AppConstants.DeployableTypes type, String fileName )
+ public void undeployViaEmbJopr( DeployableTypeInfo type, String fileName )
throws IOException, HtmlElementNotFoundException, ActionNotAvailableException,
ActionOutOfSyncException, EmbJoprTestException
{
@@ -2381,7 +2398,7 @@
* Returns true if EmbJopr lists a deployable of given type and name,
* and it's State is UP; false otherwise.
*/
- public boolean isDeployedAccordingToEmbJopr( DeployableTypes type, String
deployableName )
+ public boolean isDeployedAccordingToEmbJopr( DeployableTypeInfo type, String
deployableName )
throws HtmlElementNotFoundException, IOException, ActionNotAvailableException{
return isDeployedAccordingToEmbJopr( type, deployableName, false );
}
@@ -2392,7 +2409,7 @@
* @param mustBeUP Deployable's state must be UP; otherwise, returns false.
*/
public boolean isDeployedAccordingToEmbJopr(
- DeployableTypes type, String deployableName, boolean mustBeUP )
+ DeployableTypeInfo type, String deployableName, boolean mustBeUP )
throws HtmlElementNotFoundException, IOException, ActionNotAvailableException
{
// Refresh / go to the appropriate page.
@@ -2432,7 +2449,7 @@
* @param name Name of the deployable, like 'hello.war'.
*/
public void waitActivelyForDeployment(
- final DeployableTypes type, final String name,
+ final DeployableTypeInfo type, final String name,
int intervalMS, int retries
)
throws EmbJoprTestException, IOException
@@ -2447,7 +2464,7 @@
* @param name Name of the deployable, like 'hello.war'.
*/
public void waitActivelyForDeployment(
- final DeployableTypes type, final String name,
+ final DeployableTypeInfo type, final String name,
int intervalMS, int retries,
EmbjoprTestCase test // used for page dump
)
@@ -2492,7 +2509,7 @@
* Returns true if there's a file of the given name in server's deploy dir;
* false otherwise.
*/
- public boolean isDeployedAccordingToFileSystem( DeployableTypes type, String name )
+ public boolean isDeployedAccordingToFileSystem( DeployableTypeInfo type, String name )
{
String deployPath = getDeployDir();
String fileName = deployPath+"/"+name;