EMBJOPR SVN: r404 - trunk/core/src/main/java/org/jboss/on/embedded/bean.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2009-05-07 16:47:41 -0400 (Thu, 07 May 2009)
New Revision: 404
Added:
trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementIntegerValueAndUnits.java
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementUtils.java
Log:
don't print fractional digit for metrics that have no units, e.g. counters (https://jira.jboss.org/jira/browse/EMBJOPR-173)
Added: trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementIntegerValueAndUnits.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementIntegerValueAndUnits.java (rev 0)
+++ trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementIntegerValueAndUnits.java 2009-05-07 20:47:41 UTC (rev 404)
@@ -0,0 +1,43 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.jboss.on.embedded.bean;
+
+import org.rhq.core.domain.measurement.MeasurementUnits;
+import org.rhq.core.domain.measurement.composite.MeasurementNumericValueAndUnits;
+import org.rhq.core.domain.measurement.util.MeasurementConverter;
+
+/**
+ * A subclass of {@link MeasurementNumericValueAndUnits) that overrides toString() to display the value as an integer
+ * (e.g. "42"), rather than a double (e.g. "42.0").
+ *
+ * @author Ian Springer
+ */
+public class MeasurementIntegerValueAndUnits extends MeasurementNumericValueAndUnits
+{
+ public MeasurementIntegerValueAndUnits(Double value, MeasurementUnits units)
+ {
+ super(value, units);
+ }
+
+ @Override
+ public String toString()
+ {
+ return MeasurementConverter.format(getValue(), getUnits(), true, 0, 0);
+ }
+}
Property changes on: trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementIntegerValueAndUnits.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Author Id Revision HeadURL
Name: svn:eol-style
+ LF
Modified: trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementUtils.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementUtils.java 2009-05-07 20:46:10 UTC (rev 403)
+++ trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementUtils.java 2009-05-07 20:47:41 UTC (rev 404)
@@ -56,7 +56,7 @@
private ResourceListItem resource;
/**
- * this resource's resource type
+ * this resource's type
*/
private ResourceType resourceType;
@@ -186,7 +186,11 @@
{
double dataValue = (Double) measurementDisplay.getMeasurementData().getValue();
MeasurementUnits units = measurementDisplay.getMeasurementDefinition().getUnits();
- MeasurementNumericValueAndUnits dataValueAndUnits = MeasurementConverter.fit(dataValue, units);
+ MeasurementNumericValueAndUnits dataValueAndUnits;
+ if (units == MeasurementUnits.NONE)
+ dataValueAndUnits = new MeasurementIntegerValueAndUnits(dataValue, units);
+ else
+ dataValueAndUnits = MeasurementConverter.fit(dataValue, units);
measurementDisplay.setMeasurementValueAndUnits(dataValueAndUnits);
}
catch (MeasurementConversionException mce)
15 years
EMBJOPR SVN: r403 - trunk/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-05-07 16:46:10 -0400 (Thu, 07 May 2009)
New Revision: 403
Modified:
trunk/jsfunit/pom.xml
Log:
Cargo's RMI port setting set explicitelly to 1099.
(22:39:44) mwringe: yeah, so cargo usually set it to be 1099 for jboss, but cargo isn't setting it right now since they changed the file that sets the ports
(22:40:45) mwringe: so cargo isn't setting the port (so it defaults the jboss default of 1099) but is still trying to use 1299 to stop the server
(22:36:37) mwringe: changing the rmi port to 1099 is a temporary fix
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-05-07 19:29:44 UTC (rev 402)
+++ trunk/jsfunit/pom.xml 2009-05-07 20:46:10 UTC (rev 403)
@@ -346,7 +346,7 @@
<!-- JBoss configuration - default, all, standard -->
<cargo.jboss.configuration>${cargo.jboss.configuration}</cargo.jboss.configuration>
<!-- Prevent Hudson RMI port collision -->
- <!--<cargo.rmi.port>11098</cargo.rmi.port>-->
+ <cargo.rmi.port>1099</cargo.rmi.port>
</properties>
<!-- Override Cargo's default files (some taken from cargo's .jar, some from 'default') -->
<configfiles>
15 years
EMBJOPR SVN: r402 - 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-05-07 15:29:44 -0400 (Thu, 07 May 2009)
New Revision: 402
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-05-07 19:23:46 UTC (rev 401)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java 2009-05-07 19:29:44 UTC (rev 402)
@@ -392,6 +392,7 @@
/**
* Changes WAR configuration, and checks whether the changes were saved.
*
+ * FAILS because Config tab is disabled.
*/
public void testWarConfigurationTab() throws IOException, EmbJoprTestException, HtmlElementNotFoundException, Exception {
@@ -452,7 +453,8 @@
/**
* Changes WAR configuration, and verifies that the changes were NOT saved.
*
- * FAILS because some of the values are read-only. EMBJOPR-96
+ * Was failing because some of the values are read-only. EMBJOPR-96
+ * FAILS because Config tab is disabled.
*/
public void testWarConfigurationTabCancel() throws IOException, EmbJoprTestException {
@@ -511,7 +513,8 @@
/**
* Redeploys WAR, using WAR's Content tab upload form.
*
- * Fails because of: EMBJOPR-109
+ * Was failing because of: EMBJOPR-109
+ * FAILS: EMBJOPR-172
*/
public void testWarRedeployment() throws IOException, EmbJoprTestException {
@@ -942,6 +945,8 @@
/**
* Restarts the WAR using button in the Control tab,
* and checks whether it's really restarted by checking whether JSP variable was reset.
+ *
+ * FAILS: EMBJOPR-172
*/
public void testRestartWar() throws IOException, EmbJoprTestException
{
15 years
EMBJOPR SVN: r401 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-05-07 15:23:46 -0400 (Thu, 07 May 2009)
New Revision: 401
Added:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb20Test.java
Removed:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java
Log:
EjbTest renamed to Ejb20Test
Copied: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb20Test.java (from rev 400, trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java)
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb20Test.java (rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb20Test.java 2009-05-07 19:23:46 UTC (rev 401)
@@ -0,0 +1,135 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jopr.jsfunit.as5.app.ejb;
+
+import org.jboss.jopr.jsfunit.*;
+import com.gargoylesoftware.htmlunit.html.*;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import javax.faces.application.FacesMessage;
+import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
+
+
+
+/**
+ * This class contains tests for testing the EmbJopr Application
+ * Management Functions for Enterprise JavaBean archives with JBoss AS 5.
+ *
+ * @author Shelly McGowan
+ *
+ */
+public class Ejb20Test extends ApplicationTestBaseAS5 {
+
+ public static final DeployableTypes APP_TYPE = DeployableTypes.EJB2;
+
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite(Ejb20Test.class);
+ }
+
+
+ /*
+ * testName: testBasicEjbDeployment
+ * assertion: verify basic deployment of an EJB JAR.
+ * test Strategy: Navigate to EJB Applications.
+ * Add a new resource. Verify the resource was successfully
+ * deployed. Undeploy the archive.
+ *
+ */
+
+ public void testBasicEjbDeployment() throws IOException, EmbJoprTestException
+ {
+
+ final String DEPLOYABLE_NAME = BASIC_EJB2;
+
+ // Navigate to EJB Applications
+ HtmlAnchor ejbLink = getNavTreeLink(APP_TYPE.getNavTreeLabel());
+ ejbLink.click();
+
+ // click on the "Add new resource" button
+ client.click("actionHeaderForm:addNewContent"); // 404 if setThrowExceptionOnFailingStatusCode(true) above
+
+ // TODO: "/ejb/BASIC_JAR" causes exceptions in seam:
+ // http://wwwapps.rdu.redhat.com/w3xpastebin/pastebin.php?show=9842
+
+ String filePath = ejtt.getTestDataDir() + "/"+APP_TYPE.getDataDir()+"/"+DEPLOYABLE_NAME;
+ log.info("Uploading EJB2 archive: "+filePath);
+ File uploadFile = new File(filePath);
+ if( !uploadFile.exists() )
+ throw new EmbJoprTestException("Can't find EJB2 file to upload: '"+filePath+"'");
+
+ // upload ejb
+ HtmlFileInput fileInput = (HtmlFileInput)client.getElement("createContentForm:file");
+ fileInput.setContentType("application/ejb");
+ fileInput.setValueAttribute(filePath);
+ client.click("createContentForm:addButton");
+
+ log.info("HTTP status after EJB2 upload: "+client.getContentPage().getWebResponse().getStatusCode());
+ log.info("renderResponse() called: " + server.getFacesContext().getRenderResponse() );
+ log.info("responseComplete() called: " + server.getFacesContext().getResponseComplete() );
+
+ String errorMessage =
+ ( server.getFacesMessages().hasNext()
+ && server.getFacesMessages().next().getSeverity() != FacesMessage.SEVERITY_INFO ) ?
+ " Faces message: "+server.getFacesMessages().next()
+ : ""; // Awful code
+
+ // FAILS because of NPE and HTTP 500.
+ // assert that the success message appeared on the client side
+ assertTrue("Success message not found."+errorMessage, client.getPageAsText().contains("Resource " + DEPLOYABLE_NAME + " created successfully!"));
+
+ // assert text and severity level for FacesMessage on server side
+ assertTrue(server.getFacesMessages().hasNext());
+ FacesMessage successMessage = server.getFacesMessages().next();
+ assertTrue(FacesMessage.SEVERITY_INFO.equals(successMessage.getSeverity()));
+ assertTrue(successMessage.getDetail().contains("Resource " + DEPLOYABLE_NAME + " created successfully!"));
+
+ assertFalse("Page contains 'Total: 0', EJBs probably not listed.", client.getPageAsText().contains("Total: 0"));
+
+
+ // Use JMX to assert that the EJB components really did deploy successfully
+ assertTrue(isEJBDeployed(DEPLOYABLE_NAME));
+
+ // Undeploy the EJB JAR
+ HtmlButtonInput deleteButton = getAppDeleteButton(DEPLOYABLE_NAME);
+ deleteButton.click();
+
+ assertTrue("Page doesn't contain success message.", client.getPageAsText().contains(EJB2_DEL_MSG + " '" + DEPLOYABLE_NAME +"'."));
+
+ assertFalse("Deployable seems not to be deployed: "+DEPLOYABLE_NAME, isEJBDeployed(DEPLOYABLE_NAME));
+
+ }// testBasicEjbDeployment()
+
+
+
+}// class
+
+
+
Deleted: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java 2009-05-07 19:23:02 UTC (rev 400)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java 2009-05-07 19:23:46 UTC (rev 401)
@@ -1,135 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.jopr.jsfunit.as5.app.ejb;
-
-import org.jboss.jopr.jsfunit.*;
-import com.gargoylesoftware.htmlunit.html.*;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import javax.faces.application.FacesMessage;
-import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
-
-
-
-/**
- * This class contains tests for testing the EmbJopr Application
- * Management Functions for Enterprise JavaBean archives with JBoss AS 5.
- *
- * @author Shelly McGowan
- *
- */
-public class EjbTest extends ApplicationTestBaseAS5 {
-
- public static final DeployableTypes APP_TYPE = DeployableTypes.EJB2;
-
-
- /**
- * @return the suite of tests being tested
- */
- public static Test suite()
- {
- return new TestSuite(EjbTest.class);
- }
-
-
- /*
- * testName: testBasicEjbDeployment
- * assertion: verify basic deployment of an EJB JAR.
- * test Strategy: Navigate to EJB Applications.
- * Add a new resource. Verify the resource was successfully
- * deployed. Undeploy the archive.
- *
- */
-
- public void testBasicEjbDeployment() throws IOException, EmbJoprTestException
- {
-
- final String DEPLOYABLE_NAME = BASIC_EJB2;
-
- // Navigate to EJB Applications
- HtmlAnchor ejbLink = getNavTreeLink(APP_TYPE.getNavTreeLabel());
- ejbLink.click();
-
- // click on the "Add new resource" button
- client.click("actionHeaderForm:addNewContent"); // 404 if setThrowExceptionOnFailingStatusCode(true) above
-
- // TODO: "/ejb/BASIC_JAR" causes exceptions in seam:
- // http://wwwapps.rdu.redhat.com/w3xpastebin/pastebin.php?show=9842
-
- String filePath = ejtt.getTestDataDir() + "/"+APP_TYPE.getDataDir()+"/"+DEPLOYABLE_NAME;
- log.info("Uploading EJB2 archive: "+filePath);
- File uploadFile = new File(filePath);
- if( !uploadFile.exists() )
- throw new EmbJoprTestException("Can't find EJB2 file to upload: '"+filePath+"'");
-
- // upload ejb
- HtmlFileInput fileInput = (HtmlFileInput)client.getElement("createContentForm:file");
- fileInput.setContentType("application/ejb");
- fileInput.setValueAttribute(filePath);
- client.click("createContentForm:addButton");
-
- log.info("HTTP status after EJB2 upload: "+client.getContentPage().getWebResponse().getStatusCode());
- log.info("renderResponse() called: " + server.getFacesContext().getRenderResponse() );
- log.info("responseComplete() called: " + server.getFacesContext().getResponseComplete() );
-
- String errorMessage =
- ( server.getFacesMessages().hasNext()
- && server.getFacesMessages().next().getSeverity() != FacesMessage.SEVERITY_INFO ) ?
- " Faces message: "+server.getFacesMessages().next()
- : ""; // Awful code
-
- // FAILS because of NPE and HTTP 500.
- // assert that the success message appeared on the client side
- assertTrue("Success message not found."+errorMessage, client.getPageAsText().contains("Resource " + DEPLOYABLE_NAME + " created successfully!"));
-
- // assert text and severity level for FacesMessage on server side
- assertTrue(server.getFacesMessages().hasNext());
- FacesMessage successMessage = server.getFacesMessages().next();
- assertTrue(FacesMessage.SEVERITY_INFO.equals(successMessage.getSeverity()));
- assertTrue(successMessage.getDetail().contains("Resource " + DEPLOYABLE_NAME + " created successfully!"));
-
- assertFalse("Page contains 'Total: 0', EJBs probably not listed.", client.getPageAsText().contains("Total: 0"));
-
-
- // Use JMX to assert that the EJB components really did deploy successfully
- assertTrue(isEJBDeployed(DEPLOYABLE_NAME));
-
- // Undeploy the EJB JAR
- HtmlButtonInput deleteButton = getAppDeleteButton(DEPLOYABLE_NAME);
- deleteButton.click();
-
- assertTrue("Page doesn't contain success message.", client.getPageAsText().contains(EJB2_DEL_MSG + " '" + DEPLOYABLE_NAME +"'."));
-
- assertFalse("Deployable seems not to be deployed: "+DEPLOYABLE_NAME, isEJBDeployed(DEPLOYABLE_NAME));
-
- }// testBasicEjbDeployment()
-
-
-
-}// class
-
-
-
15 years
EMBJOPR SVN: r400 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: as5/app/ejb and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-05-07 15:23:02 -0400 (Thu, 07 May 2009)
New Revision: 400
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java
Log:
EjbTest updated
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-05-07 19:09:52 UTC (rev 399)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-05-07 19:23:02 UTC (rev 400)
@@ -119,7 +119,7 @@
// Test Archives
// EJB 3.0
- public static final String BASIC_JAR = "deployment-ejb.jar";
+ public static final String BASIC_EJB2 = "deployment-ejb.jar";
public static final String BASIC_EJB3 = "basic-ejb3.jar";
Property changes on: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb
___________________________________________________________________
Name: svn:ignore
+ EjbTest_.java
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java 2009-05-07 19:09:52 UTC (rev 399)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java 2009-05-07 19:23:02 UTC (rev 400)
@@ -43,10 +43,12 @@
*/
public class EjbTest extends ApplicationTestBaseAS5 {
+ public static final DeployableTypes APP_TYPE = DeployableTypes.EJB2;
+
+
/**
* @return the suite of tests being tested
*/
-
public static Test suite()
{
return new TestSuite(EjbTest.class);
@@ -64,10 +66,11 @@
public void testBasicEjbDeployment() throws IOException, EmbJoprTestException
{
- log.info(DebugUtils.getCurrentMethodFullName());
+ final String DEPLOYABLE_NAME = BASIC_EJB2;
+
// Navigate to EJB Applications
- HtmlAnchor ejbLink = getNavTreeLink(NAV_EJB2);
+ HtmlAnchor ejbLink = getNavTreeLink(APP_TYPE.getNavTreeLabel());
ejbLink.click();
// click on the "Add new resource" button
@@ -76,11 +79,11 @@
// TODO: "/ejb/BASIC_JAR" causes exceptions in seam:
// http://wwwapps.rdu.redhat.com/w3xpastebin/pastebin.php?show=9842
- String filePath = System.getProperty("jsfunit.testdata") + "/ejb/"+BASIC_JAR;
- log.info("Uploading EJB archive: "+filePath);
+ String filePath = ejtt.getTestDataDir() + "/"+APP_TYPE.getDataDir()+"/"+DEPLOYABLE_NAME;
+ log.info("Uploading EJB2 archive: "+filePath);
File uploadFile = new File(filePath);
if( !uploadFile.exists() )
- throw new EmbJoprTestException("Can't find EJB file to upload: '"+filePath+"'");
+ throw new EmbJoprTestException("Can't find EJB2 file to upload: '"+filePath+"'");
// upload ejb
HtmlFileInput fileInput = (HtmlFileInput)client.getElement("createContentForm:file");
@@ -88,7 +91,7 @@
fileInput.setValueAttribute(filePath);
client.click("createContentForm:addButton");
- log.info("HTTP status after EJB upload: "+client.getContentPage().getWebResponse().getStatusCode());
+ log.info("HTTP status after EJB2 upload: "+client.getContentPage().getWebResponse().getStatusCode());
log.info("renderResponse() called: " + server.getFacesContext().getRenderResponse() );
log.info("responseComplete() called: " + server.getFacesContext().getResponseComplete() );
@@ -100,27 +103,33 @@
// FAILS because of NPE and HTTP 500.
// assert that the success message appeared on the client side
- assertTrue("Success message not found."+errorMessage, client.getPageAsText().contains("Resource " + BASIC_JAR + " created successfully!"));
+ assertTrue("Success message not found."+errorMessage, client.getPageAsText().contains("Resource " + DEPLOYABLE_NAME + " created successfully!"));
// assert text and severity level for FacesMessage on server side
assertTrue(server.getFacesMessages().hasNext());
FacesMessage successMessage = server.getFacesMessages().next();
assertTrue(FacesMessage.SEVERITY_INFO.equals(successMessage.getSeverity()));
- assertTrue(successMessage.getDetail().contains("Resource " + BASIC_JAR + " created successfully!"));
+ assertTrue(successMessage.getDetail().contains("Resource " + DEPLOYABLE_NAME + " created successfully!"));
assertFalse("Page contains 'Total: 0', EJBs probably not listed.", client.getPageAsText().contains("Total: 0"));
// Use JMX to assert that the EJB components really did deploy successfully
- assertTrue(isEJBDeployed(BASIC_JAR));
+ assertTrue(isEJBDeployed(DEPLOYABLE_NAME));
// Undeploy the EJB JAR
- HtmlButtonInput deleteButton = getAppDeleteButton(BASIC_JAR);
+ HtmlButtonInput deleteButton = getAppDeleteButton(DEPLOYABLE_NAME);
deleteButton.click();
- assertTrue(client.getPageAsText().contains(EJB2_DEL_MSG + " '" + BASIC_JAR +"'."));
+ assertTrue("Page doesn't contain success message.", client.getPageAsText().contains(EJB2_DEL_MSG + " '" + DEPLOYABLE_NAME +"'."));
- assertFalse(isEJBDeployed(BASIC_JAR));
- }
+ assertFalse("Deployable seems not to be deployed: "+DEPLOYABLE_NAME, isEJBDeployed(DEPLOYABLE_NAME));
+
+ }// testBasicEjbDeployment()
-}
+
+
+}// class
+
+
+
15 years
EMBJOPR SVN: r399 - 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-05-07 15:09:52 -0400 (Thu, 07 May 2009)
New Revision: 399
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-05-07 17:47:06 UTC (rev 398)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java 2009-05-07 19:09:52 UTC (rev 399)
@@ -402,6 +402,7 @@
/**
* Changes EAR configuration, and checks whether the changes were saved.
*
+ * FAILS: Configuration tab is disabled.
*/
public void testEarConfigurationTab() throws IOException, EmbJoprTestException {
@@ -420,7 +421,8 @@
Page prevPage = client.getContentPage();
ejtt.tabMenu.clickConfigurationTab();
- assertNotSame("We should move to other page after clicking the Config tab.",
+ // FAILS: Configuration tab is disabled.
+ assertNotSame("We should move to other page after clicking the Config tab. Perhaps Config tab is disabled?",
prevPage, client.getContentPage());
// Read properties.
@@ -462,6 +464,7 @@
/**
* Changes EAR configuration, and verifies that the changes were NOT saved.
*
+ * FAILS: Configuration tab is disabled.
*/
public void testEarConfigurationTabCancel() throws IOException, EmbJoprTestException {
@@ -784,7 +787,8 @@
/**
* Stops and Starts an EAR with WAR in the Control tab.
*
- * FAILS because of EMBJOPR-133.
+ * Was failing because of EMBJOPR-133.
+ * Now FAILS because of EMBJOPR-172.
*/
public void testStopAndStartEar() throws IOException, EmbJoprTestException
{
15 years
EMBJOPR SVN: r398 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: as5/datasources and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: fjuma
Date: 2009-05-07 13:47:06 -0400 (Thu, 07 May 2009)
New Revision: 398
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceConfigurationTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceMetricsTest.java
Log:
Modifying the expected value for "Connection Count" in testMetricsAfterClosingConnections().
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java 2009-05-07 17:41:24 UTC (rev 397)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java 2009-05-07 17:47:06 UTC (rev 398)
@@ -459,12 +459,11 @@
Map<String, String> propertiesMap = new HashMap<String, String>();
propertiesMap.put("jndi-name", datasourceName);
propertiesMap.put("prefill", "true");
- propertiesMap.put("track-connection-by-tx", "false");
+ propertiesMap.put("track-connection-by-tx", "true");
propertiesMap.put("max-pool-size", "20");
propertiesMap.put("min-pool-size", "5");
propertiesMap.put("blocking-timeout-millis", "55000");
propertiesMap.put("idle-timeout-minutes", "60");
- propertiesMap.put("no-tx-separate-pools", "true");
propertiesMap.put("user-name", "sa");
propertiesMap.put("password", "");
propertiesMap.put("domain", "HsqlDbRealm");
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceConfigurationTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceConfigurationTest.java 2009-05-07 17:41:24 UTC (rev 397)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceConfigurationTest.java 2009-05-07 17:47:06 UTC (rev 398)
@@ -141,7 +141,6 @@
enableOrDisableFormInput("idle-timeout-minutes", Boolean.FALSE, RESOURCE_CONFIGURATION_FORM);
enableOrDisableFormInput("track-connection-by-tx", Boolean.FALSE, RESOURCE_CONFIGURATION_FORM);
enableOrDisableFormInput("domain", Boolean.FALSE, RESOURCE_CONFIGURATION_FORM);
- enableOrDisableFormInput("no-tx-separate-pools", Boolean.FALSE, RESOURCE_CONFIGURATION_FORM);
client.click(SAVE_BUTTON);
// Check for the appropriate success messages
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceMetricsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceMetricsTest.java 2009-05-07 17:41:24 UTC (rev 397)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceMetricsTest.java 2009-05-07 17:47:06 UTC (rev 398)
@@ -237,7 +237,7 @@
// Set up the expected values
Map<String, String> expectedMetrics = new LinkedHashMap<String, String>();
expectedMetrics.put(AVAILABLE_CONNECTION_COUNT, "17.0");
- expectedMetrics.put(CONNECTION_COUNT, "3.0");
+ expectedMetrics.put(CONNECTION_COUNT, "5.0");
expectedMetrics.put(CONNECTION_CREATED_COUNT, "5.0");
expectedMetrics.put(CONNECTION_DESTROYED_COUNT, "0.0");
expectedMetrics.put(IN_USE_CONNECTION_COUNT, "3.0");
15 years
EMBJOPR SVN: r397 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb.
by embjopr-commits@lists.jboss.org
Author: smcgowan(a)redhat.com
Date: 2009-05-07 13:41:24 -0400 (Thu, 07 May 2009)
New Revision: 397
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java
Log:
recommit minor changes to test that were overwritten
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java 2009-05-07 15:47:58 UTC (rev 396)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTest.java 2009-05-07 17:41:24 UTC (rev 397)
@@ -108,8 +108,6 @@
assertTrue(FacesMessage.SEVERITY_INFO.equals(successMessage.getSeverity()));
assertTrue(successMessage.getDetail().contains("Resource " + BASIC_JAR + " created successfully!"));
-
- // TODO: Check if listed. See EMBJOPR-74.
assertFalse("Page contains 'Total: 0', EJBs probably not listed.", client.getPageAsText().contains("Total: 0"));
@@ -120,9 +118,9 @@
HtmlButtonInput deleteButton = getAppDeleteButton(BASIC_JAR);
deleteButton.click();
- assertTrue(client.getPageAsText().contains("Successfully deleted " + NAV_EJB2 + " '" + BASIC_JAR +"'."));
+ assertTrue(client.getPageAsText().contains(EJB2_DEL_MSG + " '" + BASIC_JAR +"'."));
- //assertFalse(isEJBDeployed(BASIC_JAR);
+ assertFalse(isEJBDeployed(BASIC_JAR));
}
}
15 years
EMBJOPR SVN: r396 - trunk/jsfunit.
by embjopr-commits@lists.jboss.org
Author: smcgowan(a)redhat.com
Date: 2009-05-07 11:47:58 -0400 (Thu, 07 May 2009)
New Revision: 396
Modified:
trunk/jsfunit/pom.xml
Log:
remove exclude of RarTests
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-05-07 15:30:19 UTC (rev 395)
+++ trunk/jsfunit/pom.xml 2009-05-07 15:47:58 UTC (rev 396)
@@ -439,7 +439,6 @@
</includes>
<excludes>
<exclude>**/as4/**</exclude>
- <exclude>**/as5/apps/rar/RarTest.java</exclude>
<!--
-->
</excludes>
15 years
EMBJOPR SVN: r395 - trunk/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-05-07 11:30:19 -0400 (Thu, 07 May 2009)
New Revision: 395
Modified:
trunk/jsfunit/pom.xml
Log:
JSFUnit POM: Rar
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-05-07 15:02:07 UTC (rev 394)
+++ trunk/jsfunit/pom.xml 2009-05-07 15:30:19 UTC (rev 395)
@@ -439,7 +439,7 @@
</includes>
<excludes>
<exclude>**/as4/**</exclude>
- <include>**/as5/apps/rar/RarTest.java</include>
+ <exclude>**/as5/apps/rar/RarTest.java</exclude>
<!--
-->
</excludes>
15 years