EMBJOPR SVN: r714 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 23:22:42 -0400 (Thu, 27 Aug 2009)
New Revision: 714
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
Log:
* JMSOperationsTest updated.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-08-28 03:06:01 UTC (rev 713)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-08-28 03:22:42 UTC (rev 714)
@@ -43,6 +43,7 @@
import org.jboss.jms.server.messagecounter.MessageCounter;
import org.jboss.jms.destination.JBossDestination;
import javax.management.ObjectName;
+import org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTable;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
@@ -645,7 +646,7 @@
expectedBuffer.append(formatTableCell("(-|\\d+)")); // Count delta -
expectedBuffer.append(formatTableCell("2")); // Depth 2
expectedBuffer.append(formatTableCell("\\d+")); // Depth delta 2
- expectedBuffer.append(formatTableCell(".*")); // Depth delta 2
+ expectedBuffer.append(formatTableCell(".*")); // Date 8/27/09 12:07:39 AM
expectedValues.add(expectedBuffer.toString());
@@ -653,7 +654,8 @@
DestinationType.QUEUE,
LIST_MSG_COUNTER_AS_HTML,
Boolean.FALSE,
- expectedValues);
+ expectedValues,
+ true);
}
/* OPERATION #8 - LIST MESSAGE COUNTER HISTORY AS HTML - APPLIES TO QUEUES ONLY*/
@@ -1766,14 +1768,25 @@
* Make sure the correct number of messages gets displayed in the
* output of the "List * Messages" operations.
*/
- private void checkListMessagesTable(int expectedNumMessages) {
+ private void checkListMessagesTable(int expectedNumMessages) throws IOException, HtmlElementNotFoundException {
+
+ // The table is loaded by AJAX? We are getting a table with the header row only.
+ ejtt.sleep(500);
+ ejtt.refreshPage();
+ ejtt.sleep(500);
// Get the result of the operation
HtmlDivision historyPanel = (HtmlDivision)client.getElement(OPERATION_HISTORY_FORM);
HtmlTable resultsTable = (HtmlTable)historyPanel.getFirstByXPath(".//table[@class='property-map-summary-table']");
assertNotNull("Could not get the result of the operation", resultsTable);
- List<HtmlTableRow> rows = resultsTable.getRows();
+ List<HtmlTableRow> rows = resultsTable.getRows();
+
+ // Try it with EJTT - HtmlUnit is giving us zero rows.
+ ContentTable table = ejtt.getTabMenu().getTabContentBox().getTable(resultsTable);
+ log.info("(EJTT reports "+table.getRows().size() +" rows in the table.)");
+
+
// Don't include the header row
int numMessages = rows.size() - 1;
15 years, 4 months
EMBJOPR SVN: r713 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 23:06:01 -0400 (Thu, 27 Aug 2009)
New Revision: 713
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
Log:
* JMSOperationsTest updated.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-08-28 02:58:40 UTC (rev 712)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-08-28 03:06:01 UTC (rev 713)
@@ -959,6 +959,14 @@
String operationName,
Boolean takesParameters,
ArrayList<String> expectedValues) throws Exception {
+ performListAsHtmlOperation(jndiName, destinationType, operationName, takesParameters, expectedValues, false);
+ }
+ private void performListAsHtmlOperation(String jndiName,
+ DestinationType destinationType,
+ String operationName,
+ Boolean takesParameters,
+ ArrayList<String> expectedValues,
+ boolean isRegEx) throws Exception {
performResourceOperation(JMS_NAV_LABEL, destinationType.getNavLabel(),
jndiName, operationName, takesParameters);
@@ -978,9 +986,13 @@
assertFalse("The result of the operation was an empty string", result.equals(""));
for(int i = 0; i < expectedValues.size(); i++) {
- //if( !shortenedResult.contains(expectedValues.get(i)) )
- if( !shortenedResult.matches(expectedValues.get(i)) )
- fail("Expected the result to match:\n\n" + expectedValues.get(i) + "\n\nbut was:\n\n" + shortenedResult);
+ boolean isSuccess = isRegEx
+ ? shortenedResult.matches(expectedValues.get(i))
+ : shortenedResult.contains(expectedValues.get(i)) ;
+ String condVerb = isRegEx ? "match" : "contain";
+
+ if( !isSuccess )
+ fail("Expected the result to "+condVerb+":\n\n" + expectedValues.get(i) + "\n\nbut was:\n\n" + shortenedResult);
}
// Clean up
15 years, 4 months
EMBJOPR SVN: r712 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 22:58:40 -0400 (Thu, 27 Aug 2009)
New Revision: 712
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java
Log:
* ConnFactoryOperationsTest updated - performListStatisticsAfterCreation() - totalMaxConnectionsInUseCount removed - causing transient errors, as old connections are sometimes counted.
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-08-28 02:56:23 UTC (rev 711)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java 2009-08-28 02:58:40 UTC (rev 712)
@@ -510,7 +510,7 @@
+ jndiName);
expectedStatistics.put("subPoolCount", "0");
expectedStatistics.put("totalConnectionsInUseCount", "0");
- expectedStatistics.put("totalMaxConnectionsInUseCount", "0");
+ //expectedStatistics.put("totalMaxConnectionsInUseCount", "0"); // Sometimes we get 1 - old connection is counted.
performResourceOperationAndCheckTable(CF_NAV_LABEL, cfType.getLabel(), jndiName,
LIST_STATISTICS, Boolean.FALSE, expectedStatistics);
15 years, 4 months
EMBJOPR SVN: r711 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 22:56:23 -0400 (Thu, 27 Aug 2009)
New Revision: 711
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
Log:
* ConnFactoryOperationsTest updated - Max Connections In Use Count:6 => Max Connections In Use Count:(6|7|8)
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-08-28 02:55:30 UTC (rev 710)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-08-28 02:56:23 UTC (rev 711)
@@ -583,9 +583,10 @@
boolean isSuccess = isRegEx
? actualResult.matches(expectedBuffer.toString())
: actualResult.contains(expectedBuffer.toString()) ;
-
+ String condVerb = isRegEx ? "match" : "contain";
+
if( !isSuccess ){
- fail(errorMessage + " - \nexpected the result to contain:\n\n" + expectedBuffer.toString() + "\n\nbut was:\n\n" + actualResult );
+ fail(errorMessage + " - \nexpected the result to "+condVerb+":\n\n" + expectedBuffer.toString() + "\n\nbut was:\n\n" + actualResult );
}
}
15 years, 4 months
EMBJOPR SVN: r710 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: as5/connfactories and 1 other directories.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 22:55:30 -0400 (Thu, 27 Aug 2009)
New Revision: 710
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
Log:
* ConnFactoryOperationsTest updated - Max Connections In Use Count:6 => Max Connections In Use Count:(6|7|8)
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-08-28 02:27:43 UTC (rev 709)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-08-28 02:55:30 UTC (rev 710)
@@ -558,6 +558,17 @@
Boolean takesParameters,
StringBuffer expectedBuffer,
String errorMessage) throws Exception {
+ performResourceOperationAndCheckValueBox(resourceCategory, resourceSubCategory, resourceName, operationName, takesParameters, expectedBuffer, errorMessage, false);
+ }
+
+ protected void performResourceOperationAndCheckValueBox(String resourceCategory,
+ String resourceSubCategory,
+ String resourceName,
+ String operationName,
+ Boolean takesParameters,
+ StringBuffer expectedBuffer,
+ String errorMessage,
+ Boolean isRegEx) throws Exception {
performResourceOperation(resourceCategory, resourceSubCategory,
resourceName, operationName, takesParameters);
@@ -568,10 +579,15 @@
assertNotNull("Could not get the result of the operation", resultTextBox);
String actualResult = resultTextBox.getText();
+
+ boolean isSuccess = isRegEx
+ ? actualResult.matches(expectedBuffer.toString())
+ : actualResult.contains(expectedBuffer.toString()) ;
+
+ if( !isSuccess ){
+ fail(errorMessage + " - \nexpected the result to contain:\n\n" + expectedBuffer.toString() + "\n\nbut was:\n\n" + actualResult );
+ }
- assertTrue(errorMessage + " - \nexpected the result to contain:\n\n"
- + expectedBuffer.toString() + "\n\nbut was:\n\n" + actualResult,
- actualResult.contains(expectedBuffer.toString()));
}
/**
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-08-28 02:27:43 UTC (rev 709)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connfactories/ConnFactoryOperationsTest.java 2009-08-28 02:55:30 UTC (rev 710)
@@ -333,7 +333,7 @@
expectedBuffer.append("Track By Transaction: true\n");
}*/
expectedBuffer.append("Available Connections Count: 14\n");
- expectedBuffer.append("Max Connections In Use Count:6\n");
+ 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");
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-08-28 02:27:43 UTC (rev 709)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-08-28 02:55:30 UTC (rev 710)
@@ -2192,10 +2192,10 @@
* Queries JBoss via JMX for given query and checks whether the
* StateString property of the first result is "Started".
*
+ * Was failing because of fix for JBPAPP-2419 - an undeterminable UID added to JMX name .
+ *
* @param mBeanName
* @return true if the StateString property of the first MBean found is "Started".
- * @throws javax.management.JMException
- * @throws java.io.IOException
*/
protected boolean isMBeanStateDeployedByQuery(String mBeanName) throws JMException, IOException, MalformedObjectNameException
{
15 years, 4 months
EMBJOPR SVN: r709 - 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-08-27 22:27:43 -0400 (Thu, 27 Aug 2009)
New Revision: 709
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java
Log:
* EarTest updated.
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-08-28 01:19:39 UTC (rev 708)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java 2009-08-28 02:27:43 UTC (rev 709)
@@ -233,7 +233,7 @@
}
else{
throw new EmbJoprTestException("The original EAR should remain deployed " +
- "after unsuccessful deployment of bad version of the same EAR.");
+ "after unsuccessful deployment of bad version of the same EAR.", this);
}
}
}
15 years, 4 months
EMBJOPR SVN: r708 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: util and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 21:19:39 -0400 (Thu, 27 Aug 2009)
New Revision: 708
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
Log:
* EJTT: EJB 2 JMX name changed, now using uid. Trying "...,*".
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-08-28 00:25:07 UTC (rev 707)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-08-28 01:19:39 UTC (rev 708)
@@ -54,7 +54,7 @@
static{
- EJB2.jmxMBeanNameFormat = "jboss.j2ee:module=\"%s\",service=EjbModule";
+ EJB2.jmxMBeanNameFormat = "jboss.j2ee:module=\"%s\",service=EjbModule,*";
EJB3.jmxMBeanNameFormat = "jboss.j2ee:ear=%1$s,jar=%1$s,service=EJB3";
}
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-08-28 00:25:07 UTC (rev 707)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-08-28 01:19:39 UTC (rev 708)
@@ -2203,11 +2203,15 @@
ObjectName objName = new ObjectName(mBeanName);
MBeanServer jmxServer = MBeanServerLocator.locateJBoss();
Set mBeans = jmxServer.queryNames(objName, null);
- if (mBeans.size() != 1) {
+ if (mBeans.size() == 0) {
log.info(mBeanName+" not found.");
return false;
}
ObjectName deploymentMBean = (ObjectName) mBeans.iterator().next();
+ if (mBeans.size() > 1) {
+ log.warn("Found "+mBeans.size()+" matching MBeans, using the first: "+deploymentMBean.getCanonicalName());
+ }
+
// Returns org.jboss.deployers.spi.DeploymentState.
Object state = jmxServer.getAttribute(deploymentMBean, "State");
log.info("State is '"+state.toString()+"'.");
15 years, 4 months
EMBJOPR SVN: r707 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/rar.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 20:25:07 -0400 (Thu, 27 Aug 2009)
New Revision: 707
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/rar/RarTest.java
Log:
* RAR test updated.
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-08-28 00:18:29 UTC (rev 706)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/rar/RarTest.java 2009-08-28 00:25:07 UTC (rev 707)
@@ -87,20 +87,20 @@
* deployed. Undeploy the archive for test clean up purposes.
*
*/
- public void testBasicRarDeployment() throws IOException, EmbJoprTestException
+ public void testRarBasicDeployment() throws IOException, EmbJoprTestException
{
final String DEPLOYABLE_NAME = BASIC_RAR;
+ // Deploy the RAR.
+ String rarFilePath = ejtt.getTestDataDir() + "/rar/"+DEPLOYABLE_NAME;
+ //deployRar( rarFilePath );
+ ejtt.deployment.deployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
+
+
try {
- // Deploy the RAR.
- String rarFilePath = ejtt.getTestDataDir() + "/rar/"+DEPLOYABLE_NAME;
- deployRar( rarFilePath );
-
String expectedMessage = DEPLOYABLE_NAME + " created successfully";
-
checkClientAndServerMessages(expectedMessage, expectedMessage, false);
-
assertTrue("JMX doesn't report RAR, jbosstestadapter.rar as deployed.", isRarDeployed(BASIC_RAR));
}
finally {
@@ -122,7 +122,7 @@
* ==> Applications ==> Resource Adapters
*
*/
- public void testNavigationToRar() throws IOException, HtmlElementNotFoundException,
+ public void testRarNavigation() throws IOException, HtmlElementNotFoundException,
ActionOutOfSyncException, ActionNotAvailableException, EmbJoprTestException, InterruptedException
{
15 years, 4 months
EMBJOPR SVN: r706 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 20:18:29 -0400 (Thu, 27 Aug 2009)
New Revision: 706
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
Log:
* JMS test updated.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-08-27 23:32:36 UTC (rev 705)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-08-28 00:18:29 UTC (rev 706)
@@ -645,6 +645,7 @@
expectedBuffer.append(formatTableCell("(-|\\d+)")); // Count delta -
expectedBuffer.append(formatTableCell("2")); // Depth 2
expectedBuffer.append(formatTableCell("\\d+")); // Depth delta 2
+ expectedBuffer.append(formatTableCell(".*")); // Depth delta 2
expectedValues.add(expectedBuffer.toString());
@@ -979,7 +980,7 @@
for(int i = 0; i < expectedValues.size(); i++) {
//if( !shortenedResult.contains(expectedValues.get(i)) )
if( !shortenedResult.matches(expectedValues.get(i)) )
- fail("Expected the result to contain:\n\n" + expectedValues.get(i) + "\n\nbut was:\n\n" + shortenedResult);
+ fail("Expected the result to match:\n\n" + expectedValues.get(i) + "\n\nbut was:\n\n" + shortenedResult);
}
// Clean up
15 years, 4 months
EMBJOPR SVN: r705 - trunk/jsfunit/testdata/jboss-configuration/conf.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-08-27 19:32:36 -0400 (Thu, 27 Aug 2009)
New Revision: 705
Modified:
trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml
Log:
* Limiting logging for:
<category name="org.jboss.managed.plugins.factory.AbstractManagedObjectFactory">
<priority value="INFO"/>
</category>
<category name="org.jboss.deployers.plugins.managed.BeanMetaDataICF">
<priority value="INFO"/>
</category>
<category name="org.jboss.profileservice.management.ManagementViewImpl">
<priority value="INFO"/>
</category>
Modified: trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml
===================================================================
--- trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml 2009-08-27 17:52:53 UTC (rev 704)
+++ trunk/jsfunit/testdata/jboss-configuration/conf/jboss-log4j.xml 2009-08-27 23:32:36 UTC (rev 705)
@@ -219,7 +219,17 @@
<priority value="INFO"/>
</category>
+ <category name="org.jboss.managed.plugins.factory.AbstractManagedObjectFactory">
+ <priority value="INFO"/>
+ </category>
+ <category name="org.jboss.deployers.plugins.managed.BeanMetaDataICF">
+ <priority value="INFO"/>
+ </category>
+ <category name="org.jboss.profileservice.management.ManagementViewImpl">
+ <priority value="INFO"/>
+ </category>
+
<!-- We care much about JOPR and JSFUnit tests. -->
<category name="org.jboss.jopr.jsfunit">
15 years, 4 months