[embjopr-commits] EMBJOPR SVN: r418 - in trunk/jsfunit: src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations and 1 other directories.

embjopr-commits at lists.jboss.org embjopr-commits at lists.jboss.org
Thu May 14 16:51:44 EDT 2009


Author: fjuma
Date: 2009-05-14 16:51:44 -0400 (Thu, 14 May 2009)
New Revision: 418

Modified:
   trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceDeletionTest.java
   trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSDeletionTest.java
   trunk/jsfunit/testdata/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml
Log:
Modifying the deletion tests for datasources and JMS destinations.


Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceDeletionTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceDeletionTest.java	2009-05-14 18:10:36 UTC (rev 417)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceDeletionTest.java	2009-05-14 20:51:44 UTC (rev 418)
@@ -121,13 +121,10 @@
         assertNull("The datasource was not removed after deletion (the ManagedComponent is non-null)",
                    getManagedComponent(propertiesMap.get("jndi-name"), componentType));
         
-        // Make sure the entry was removed from the -ds.xml file (See JOPR-44)
-        assertFalse(containsElement(propertiesMap.get("jndi-name"),
-                                    datasourceType.getXmlElementName()));
-        
-        assertFalse("According to JMX view, the deleted datasource is still deployed",
-                    isDatasourceDeployed(propertiesMap.get("jndi-name"),
-                                         datasourceType));
+        // The entry should still be found in the -ds.xml file
+        assertTrue("The datasource was removed from the -ds.xml file",
+                   containsElement(propertiesMap.get("jndi-name"),
+                                   datasourceType.getXmlElementName()));
     }
     
     /**
@@ -151,9 +148,15 @@
         // Make sure the ManagedComponent was removed
         assertNull("The datasource was not removed after deletion (the ManagedComponent is non-null)",
                    getManagedComponent(jndiName, NO_TX_COMPONENT_TYPE));
-
-        // Make sure only the No TX Datasource entry was removed 
-        // from the -ds.xml file
+        
+        // Make sure the other datasources defined in the -ds.xml file were not
+        // removed
+        assertNotNull("Another datasource in the same -ds.xml file was also removed (the ManagedComponent is null)",
+                      getManagedComponent("LocalTX1", LOCAL_TX_COMPONENT_TYPE));
+        assertNotNull("Another datasource in the same -ds.xml file was also removed (the ManagedComponent is null)",
+                      getManagedComponent("LocalTX2", LOCAL_TX_COMPONENT_TYPE));
+        
+        // Make sure the -ds.xml file remained unchanged
         String actualDSFile = System.getProperty("jsfunit.deploy.dir") 
                               + "/MultipleDatasources-ds.xml";
         String expectedDSFile = System.getProperty("jsfunit.testdata") 

Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSDeletionTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSDeletionTest.java	2009-05-14 18:10:36 UTC (rev 417)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSDeletionTest.java	2009-05-14 20:51:44 UTC (rev 418)
@@ -113,7 +113,7 @@
         // Make sure the ManagedComponent was removed
         assertNull("The destination was not removed after deletion (the ManagedComponent is non-null)",
                    getManagedComponent(jndiName, componentType));
-        assertFalse("The entry was not removed from the -service.xml file after deletion",
+        assertTrue("The entry was removed from the -service.xml file after deletion",
                     containsElement(getDestinationDeploymentFile(jndiName), 
                                     SERVICE_FILE_CHILD_ELEMENT, 
                                     SERVICE_FILE_ROOT_ELEMENT));

Modified: trunk/jsfunit/testdata/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml
===================================================================
--- trunk/jsfunit/testdata/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml	2009-05-14 18:10:36 UTC (rev 417)
+++ trunk/jsfunit/testdata/datasources/expectedFiles/ExpectedMultipleDatasourcesAfterDeletion-ds.xml	2009-05-14 20:51:44 UTC (rev 418)
@@ -31,6 +31,38 @@
       <driver-class>org.hsqldb.jdbcDriver</driver-class>
       <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
    </local-tx-datasource>
+   <no-tx-datasource>
+      <jndi-name>NoTXDeletionTest</jndi-name>
+      <rar-name>jboss-local-jdbc.rar</rar-name>
+      <use-java-context>true</use-java-context>
+      <connection-definition>javax.sql.DataSource</connection-definition>
+      <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
+      <min-pool-size>5</min-pool-size>
+      <max-pool-size>20</max-pool-size>
+      <blocking-timeout-millis>55000</blocking-timeout-millis>
+      <idle-timeout-minutes>60</idle-timeout-minutes>
+      <prefill>true</prefill>
+      <background-validation>false</background-validation>
+      <background-validation-millis>0</background-validation-millis>
+      <validate-on-match>true</validate-on-match>
+      <statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
+      <isSameRM-override-value>false</isSameRM-override-value>
+      <interleaving/>
+      <allocation-retry>0</allocation-retry>
+      <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
+      <metadata>
+          <type-mapping>FirstSQL/J</type-mapping>
+      </metadata>
+      <user-name>sa</user-name>
+      <password></password>
+      <prepared-statement-cache-size>0</prepared-statement-cache-size>
+      <share-prepared-statements>false</share-prepared-statements>
+      <set-tx-query-timeout>false</set-tx-query-timeout>
+      <query-timeout>0</query-timeout>
+      <use-try-lock>60000</use-try-lock>
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+   </no-tx-datasource>
    <local-tx-datasource>
       <jndi-name>LocalTX2</jndi-name>
       <rar-name>jboss-local-jdbc.rar</rar-name>




More information about the embjopr-commits mailing list