[embjopr-commits] EMBJOPR SVN: r194 - in trunk/jsfunit: src/test/java/org/jboss/jopr/jsfunit and 1 other directories.
embjopr-commits at lists.jboss.org
embjopr-commits at lists.jboss.org
Mon Mar 9 14:55:37 EDT 2009
Author: fjuma
Date: 2009-03-09 14:55:37 -0400 (Mon, 09 Mar 2009)
New Revision: 194
Modified:
trunk/jsfunit/pom.xml
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java
Log:
Made minor changes to EmbjoprTestCase.java in order to update to jboss-integration-5.1.0.CR1.
Made minor changes to the datasource configuration tests.
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-03-09 13:23:20 UTC (rev 193)
+++ trunk/jsfunit/pom.xml 2009-03-09 18:55:37 UTC (rev 194)
@@ -111,7 +111,7 @@
<dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-profileservice-spi</artifactId>
- <version>5.0.3.GA</version>
+ <version>5.1.0.CR1</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java 2009-03-09 13:23:20 UTC (rev 193)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/DatasourceTestBase.java 2009-03-09 18:55:37 UTC (rev 194)
@@ -309,7 +309,7 @@
public Connection connectDB(String jndiName, String username,
String password) throws Exception{
Context ctx = new InitialContext();
- DataSource ds = (DataSource)ctx.lookup(jndiName);
+ DataSource ds = (DataSource)ctx.lookup("java:" + jndiName);
return ds.getConnection(username, password);
}
@@ -972,8 +972,7 @@
String expected = metricsMap.get(metricName);
String actual = getMetricValueFromTable(metricName, "dataTable");
actual = normalizeIfDoubleExpected(expected, actual); // Some LOCALEs encode doubles with coma.
- assertEquals("Incorrect metric value for '"+metricName+"'='"+actual+"'," +
- " expected '"+expected+"'", expected, actual);
+ assertEquals("Incorrect metric value for '" + metricName + "'", expected, actual);
}
// Check values under the "Summary" tab
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-03-09 13:23:20 UTC (rev 193)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-03-09 18:55:37 UTC (rev 194)
@@ -155,7 +155,7 @@
String id = link.getIdAttribute();
String[] idElements = id.split(":");
String row = idElements[idElements.length - 2];
- return (HtmlButtonInput)client.getElement(row + ":removeButton");
+ return (HtmlButtonInput)client.getElement("dataTable:" + row + ":removeButton");
}
/**
@@ -750,8 +750,7 @@
ManagedDeployment managedDeployment = null;
try {
- managedDeployment = currentProfileView.getDeployment(deployment,
- ManagedDeployment.DeploymentPhase.APPLICATION);
+ managedDeployment = currentProfileView.getDeployment(deployment);
} catch (NoSuchDeploymentException e) {
return false;
}
@@ -792,12 +791,9 @@
{
ProfileService profileService = getProfileService();
ManagementView currentProfileView = profileService.getViewManager();
- String[] domains = profileService.getDomains();
-
- ProfileKey defaultKey = new ProfileKey(domains[0]);
-
+
try {
- currentProfileView.loadProfile(defaultKey);
+ currentProfileView.load();
} catch (Exception e) {
log.error("Could not find default Profile in Current Profile View", e);
}
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java 2009-03-09 13:23:20 UTC (rev 193)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/DatasourceTest.java 2009-03-09 18:55:37 UTC (rev 194)
@@ -244,9 +244,7 @@
*/
public void testConfigureDatasourceChangeSetProperties() throws IOException, EmbJoprTestException {
Map<String, String> propertiesMap = createXADatasource("ChangeSetPropertiesDS");
- assertTrue("Error creating datasource",
- client.getPageAsText().contains("Successfully added"));
-
+
// Change some property values that are already set
Map<String, String> propertiesMapChanges = new HashMap<String, String>();
propertiesMapChanges.put("xa-resource-timeout", "60000");
@@ -287,8 +285,6 @@
*/
public void testConfigureDatasourceChangeUnsetProperties() throws IOException, EmbJoprTestException {
Map<String, String> propertiesMap = createLocalTXDatasource("ChangeUnsetPropertiesDS");
- assertTrue("Error creating datasource",
- client.getPageAsText().contains("Successfully added"));
// Set some property values that were previously unset
Map<String, String> propertiesMapChanges = new HashMap<String, String>();
@@ -332,8 +328,6 @@
*/
public void testConfigureDatasourceUnsetProperties() throws IOException, EmbJoprTestException {
Map<String, String> propertiesMap = createNoTXDatasource("UnsetPropertiesDS");
- assertTrue("Error creating datasource",
- client.getPageAsText().contains("Successfully added"));
// Unset some property values
navigateToPage(propertiesMap.get("jndi-name"),
More information about the embjopr-commits
mailing list