EMBJOPR SVN: r743 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-02 13:25:24 -0400 (Wed, 02 Sep 2009)
New Revision: 743
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java
Log:
* WarTest updated.
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-09-02 17:18:13 UTC (rev 742)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java 2009-09-02 17:25:24 UTC (rev 743)
@@ -921,6 +921,7 @@
*/
public void testDeployUnpackedWar() throws IOException, EmbJoprTestException {
+ final String DEPLOYABLE_NAME = WAR_UNPACKED;
// Deploy the unpacked WAR.
// We have to use hotdeploy - can't upload a directory.
@@ -946,8 +947,12 @@
ejtt.getNavTree().getNodeByLabel(NAV_WAR).click();
- ContentTableRow row = ejtt.getDefaultContentTable().getFirstRowContainingLink(WAR_UNPACKED);
+ //ContentTableRow row = ejtt.getDefaultContentTable().getFirstRowContainingLink(WAR_UNPACKED);
+ if( ! ejtt.deployment.isDeployedAccordingToEmbJopr(APP_TYPE, WAR_UNPACKED) )
+ throw new EmbJoprTestException("Unpacked hotdeployed war not found: "+WAR_UNPACKED, this);
+
+
// TODO: Finish
// TODO: Check whether Exploded?: yes. EMBJOPR-95
16 years, 7 months
EMBJOPR SVN: r742 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-02 13:18:13 -0400 (Wed, 02 Sep 2009)
New Revision: 742
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
Log:
* EJTT updated.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-09-02 17:07:25 UTC (rev 741)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-09-02 17:18:13 UTC (rev 742)
@@ -600,8 +600,6 @@
FacesMessage message = server.getFacesMessages().next();
- assertTrue("Expected message: " + expectedServerMsg + " Actual: "+ message.getDetail(),
- message.getDetail().contains(expectedServerMsg));
if( ! message.getDetail().contains(expectedServerMsg) ){
//throw new EmbJoprTestException( "Expected message: " + expectedServerMsg + " Actual: "+ message.getDetail(), this);
String fileName = this.getName() + "-msgCheck.html";
@@ -611,6 +609,13 @@
fail( "\nExpected message: [" + expectedServerMsg + "]\nActual: ["+ message.getDetail() + "]\nPage dumped to '"+fileName+"'." );
}
+ /* The same in light blue.
+ if( ! message.getDetail().contains(expectedServerMsg) ){
+ String msg = "Expected message: " + expectedServerMsg + " Actual: "+ message.getDetail();
+ new EmbJoprTestException(msg, this);
+ fail(msg);
+ }/**/
+
assertEquals("Incorrect message severity. Message: "+message.getSummary(), expectedSeverity, message.getSeverity());
16 years, 7 months
EMBJOPR SVN: r741 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-02 13:07:25 -0400 (Wed, 02 Sep 2009)
New Revision: 741
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java
Log:
* JBossASNodeTest updated
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java 2009-09-02 16:40:54 UTC (rev 740)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java 2009-09-02 17:07:25 UTC (rev 741)
@@ -55,21 +55,21 @@
Version:5.1.0.CR1
Description:JBoss Application Server
*/
- headerText = "General Properties";
+ headerText = LABEL_GENERAL_PROPERTIES;
assertTrue("Page doesn't contain the header: "+headerText, pageText.contains(headerText));
table = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader(headerText);
infoTable = ejtt.getContentInfoTable(table.getElement());
properties = infoTable.getProperties();
- assertEquals("General Properties / Name", pageHeaderText, properties.getProperty("Name") );
+ assertEquals(LABEL_GENERAL_PROPERTIES+" / Name", pageHeaderText, properties.getProperty("Name") );
String versionPrefix = "5.1";
String jmxMBeanName = "jboss.system:type=Server";
versionPrefix = (String) jmxUtils.getMBeanAttribute(jmxMBeanName, "VersionNumber");
- assertTrue("General Properties / Version startsWith('"+versionPrefix+"')",
+ assertTrue(LABEL_GENERAL_PROPERTIES+" / Version startsWith('"+versionPrefix+"')",
properties.getProperty("Version","~not found~").startsWith(versionPrefix) );
- assertEquals("General Properties / Description", AS_NODE_DESCRIPTION, properties.get("Description") );
+ assertEquals(LABEL_GENERAL_PROPERTIES+" / Description", AS_NODE_DESCRIPTION, properties.get("Description") );
/*
@@ -158,7 +158,7 @@
// Read new values.
- headerText = "Metrics Summary";
+ headerText = LABEL_NUMERIC_METRICS;
assertTrue("Page doesn't contain the header: "+headerText, pageText.contains(headerText));
table = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader(headerText);
16 years, 7 months
EMBJOPR SVN: r740 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-02 12:40:54 -0400 (Wed, 02 Sep 2009)
New Revision: 740
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java
Log:
* JBossASNodeTest updated
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java 2009-09-02 16:15:02 UTC (rev 739)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java 2009-09-02 16:40:54 UTC (rev 740)
@@ -5,15 +5,12 @@
package org.jboss.jopr.jsfunit.as5;
-import com.gargoylesoftware.htmlunit.BrowserVersion;
-import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import java.io.IOException;
import java.util.Properties;
import javax.management.JMException;
import org.apache.commons.lang.math.NumberUtils;
import org.jboss.jopr.jsfunit.AppConstants;
-import org.jboss.jopr.jsfunit.DebugUtils;
import org.jboss.jopr.jsfunit.EmbjoprTestCase;
import org.jboss.jopr.jsfunit.JMXUtils;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
@@ -41,8 +38,8 @@
// Whole page contains
String pageHeaderText = String.format(AS_NODE_NAME_FORMAT, jbossConfig);
//assertTrue("Page doesn't contain the header: "+headerText, pageText.contains(headerText));
- assertTrue("Content doesn't contain the header: "+pageHeaderText,
- client.getElement("content").getTextContent().contains(pageHeaderText));
+ if( ! client.getElement("content").getTextContent().contains(pageHeaderText) )
+ throw new EmbJoprTestException("Content doesn't contain the header: "+pageHeaderText, this);
ContentTable table;
ContentInfoTable infoTable;
16 years, 7 months
EMBJOPR SVN: r739 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-02 12:15:02 -0400 (Wed, 02 Sep 2009)
New Revision: 739
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java
Log:
* JBossCacheTest - caches names back to CR3 (full MBean name)
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-09-02 13:27:00 UTC (rev 738)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java 2009-09-02 16:15:02 UTC (rev 739)
@@ -18,16 +18,18 @@
// Cache which is active by default.
- //protected static final String JBCACHE_HA_PARTITION = "jboss.cache:config=ha-partition,service=Cache";
- protected static final String JBCACHE_HA_PARTITION = "ha-partition";
- //protected static final String JBCACHE_MVCC_ENTITY = "jboss.cache:config=mvcc-entity,service=Cache";
- protected static final String JBCACHE_MVCC_ENTITY = "mvcc-entity";
- //protected static final String JBCACHE_PESSIMISTIC_SHARED = "jboss.cache:config=pessimistic-shared,service=Cache";
- protected static final String JBCACHE_PESSIMISTIC_SHARED = "pessimistic-shared";
- //protected static final String JBCACHE_TIMESTAMPS = "jboss.cache:config=timestamps-cache,service=Cache";
- protected static final String JBCACHE_TIMESTAMPS = "timestamps-cache";
+ protected static final String JBCACHE_HA_PARTITION = "jboss.cache:config=ha-partition,service=Cache";
+ protected static final String JBCACHE_MVCC_ENTITY = "jboss.cache:config=mvcc-entity,service=Cache";
+ protected static final String JBCACHE_PESSIMISTIC_SHARED = "jboss.cache:config=pessimistic-shared,service=Cache";
+ protected static final String JBCACHE_TIMESTAMPS = "jboss.cache:config=timestamps-cache,service=Cache";
+ // Post-CR3
+// protected static final String JBCACHE_HA_PARTITION = "ha-partition";
+// protected static final String JBCACHE_MVCC_ENTITY = "mvcc-entity";
+// protected static final String JBCACHE_PESSIMISTIC_SHARED = "pessimistic-shared";
+// protected static final String JBCACHE_TIMESTAMPS = "timestamps-cache";
+
// Subnodes
protected static final String SUBNODE_CACHE = "Cache";
protected static final String SUBNODE_INTERCEPTOR = "Interceptor";
16 years, 7 months
EMBJOPR SVN: r738 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-02 09:27:00 -0400 (Wed, 02 Sep 2009)
New Revision: 738
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java
Log:
* ConnFactory test updated
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java 2009-09-02 13:24:34 UTC (rev 737)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java 2009-09-02 13:27:00 UTC (rev 738)
@@ -446,9 +446,10 @@
}*/
expectedBuffer.append("Available Connections Count: 12\n");
- expectedBuffer.append("Max Connections In Use Count:10\n");
+ expectedBuffer.append("Max Connections In Use Count:1(0|1|2)\n"); // Sometimes old conns are counted.
expectedBuffer.append("Connections Destroyed Count:0\n");
expectedBuffer.append("Connections In Use Count:8");
+ expectedBuffer.append(".*");
String errorMessage = "Incorrect sub pool statistics";
16 years, 7 months
EMBJOPR SVN: r737 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-02 09:24:34 -0400 (Wed, 02 Sep 2009)
New Revision: 737
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java
Log:
* ConnFactory test updated
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java 2009-09-02 12:17:33 UTC (rev 736)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java 2009-09-02 13:24:34 UTC (rev 737)
@@ -336,6 +336,7 @@
expectedBuffer.append("Max Connections In Use Count:(6|7|8)\n"); // Give it some tolerance - sometimes we get 7 or 8 too.
expectedBuffer.append("Connections Destroyed Count:0\n");
expectedBuffer.append("Connections In Use Count:6\n");
+ expectedBuffer.append(".*");
String errorMessage = "Incorrect sub pool statistics";
16 years, 7 months
EMBJOPR SVN: r736 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5: connfactories and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-02 08:17:33 -0400 (Wed, 02 Sep 2009)
New Revision: 736
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryMetricsTest.java
Log:
* JMS tests fixed
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-09-01 20:00:34 UTC (rev 735)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-09-02 12:17:33 UTC (rev 736)
@@ -37,6 +37,7 @@
import java.util.List;
import java.util.LinkedHashMap;
import java.util.Properties;
+import org.apache.commons.lang.StringUtils;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.NavTreeNode;
import org.jboss.jopr.jsfunit.exceptions.*;
@@ -141,6 +142,10 @@
public String[] listStatisticsProps = new String[] { "blocking-timeout-millis", "idle-timeout-minutes",
"max-pool-size", "min-pool-size", "no-tx-separate-pools",
"prefill" /*, "track-connection-by-tx" JBAS-6918 */ };
+
+ public static final String REGEX_PREFIX = "@REGEX:";
+
+
/**
* Create a new resource using the given type, template, and properties.
@@ -490,11 +495,22 @@
while(i.hasNext()) {
String metricName = (String)i.next();
+ String expected = metricsMap.get(metricName);
+ boolean isRegex = StringUtils.startsWith(expected, REGEX_PREFIX);
+ if( isRegex ){
+ expected = StringUtils.removeStart(expected, REGEX_PREFIX);
+ }
- String expected = metricsMap.get(metricName);
+
String actual = getMetricValueFromTable(metricName, DATA_TABLE);
actual = normalizeIfDoubleExpected(expected, actual);
- assertEquals(errorMessage + " '" + metricName + "'", expected, actual);
+
+ if( isRegex ){
+ if( ! actual.matches(expected) )
+ fail("Property "+metricName+" doesn't match - expedted: "+expected+ " Actual: "+actual);
+ }else {
+ assertEquals(errorMessage + " '" + metricName + "'", expected, actual);
+ }
}
}
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryMetricsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryMetricsTest.java 2009-09-01 20:00:34 UTC (rev 735)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryMetricsTest.java 2009-09-02 12:17:33 UTC (rev 736)
@@ -22,17 +22,11 @@
package org.jboss.jopr.jsfunit.as5.connfactories;
-import org.jboss.jopr.jsfunit.*;
-import com.gargoylesoftware.htmlunit.html.*;
-import java.io.*;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.jopr.jsfunit.exceptions.*;
-import org.jboss.jopr.jsfunit.as5.ResourceTestBase;
import java.util.ArrayList;
import java.util.Map;
import java.util.LinkedHashMap;
-import javax.resource.cci.ConnectionFactory;
import javax.resource.cci.Connection;
/**
@@ -244,7 +238,7 @@
// Set up the expected values
Map<String, String> expectedMetrics = new LinkedHashMap<String, String>();
expectedMetrics.put(AVAILABLE_CONNECTION_COUNT, "14");
- expectedMetrics.put(CONNECTION_COUNT, "6");
+ expectedMetrics.put(CONNECTION_COUNT, REGEX_PREFIX+"(6|7|8)");
expectedMetrics.put(CONNECTION_CREATED_COUNT, "6");
expectedMetrics.put(CONNECTION_DESTROYED_COUNT, "0");
expectedMetrics.put(IN_USE_CONNECTION_COUNT, "6");
16 years, 7 months
EMBJOPR SVN: r735 - trunk/jsfunit/testdata/ear.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2009-09-01 16:00:34 -0400 (Tue, 01 Sep 2009)
New Revision: 735
Added:
trunk/jsfunit/testdata/ear/vhosts-test.ear
Log:
an EAR containing a WAR that defines 2 vhosts in its jboss-web.xml
Added: trunk/jsfunit/testdata/ear/vhosts-test.ear
===================================================================
(Binary files differ)
Property changes on: trunk/jsfunit/testdata/ear/vhosts-test.ear
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 7 months
EMBJOPR SVN: r734 - trunk/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-09-01 14:24:54 -0400 (Tue, 01 Sep 2009)
New Revision: 734
Modified:
trunk/jsfunit/pom.xml
Log:
* POM fixed - see CARGO-729.
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-09-01 17:24:21 UTC (rev 733)
+++ trunk/jsfunit/pom.xml 2009-09-01 18:24:54 UTC (rev 734)
@@ -409,7 +409,7 @@
<jsfunit.jboss.home.dir>${basedir}/target/jboss5x</jsfunit.jboss.home.dir>
<htmlunit.browser>${htmlunit.browser}</htmlunit.browser>
<jsfunit.jboss.isSecured>${jboss.isSecured}</jsfunit.jboss.isSecured>
- <jboss.platform.mbeanserver/> <!-- Makes the JVM resource appear. -->
+ <jboss.platform.mbeanserver>true</jboss.platform.mbeanserver> <!-- Makes the JVM resource appear. -->
</systemProperties>
</container>
16 years, 7 months