[exo-jcr-commits] exo-jcr SVN: r5169 - in core/trunk/exo.core.component.organization.jdbc: src/test/resources/conf/standalone and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Nov 8 02:47:11 EST 2011


Author: dkuleshov
Date: 2011-11-08 02:47:11 -0500 (Tue, 08 Nov 2011)
New Revision: 5169

Modified:
   core/trunk/exo.core.component.organization.jdbc/pom.xml
   core/trunk/exo.core.component.organization.jdbc/src/test/resources/conf/standalone/test-configuration-hibernate.xml
   core/trunk/exo.core.component.organization.jdbc/src/test/resources/conf/standalone/test-configuration-jdbc.xml
Log:
EXOJCR-1572:  changed unit tests executions, now both jdbc and hibernate org service tests are run during single lounch by default

Modified: core/trunk/exo.core.component.organization.jdbc/pom.xml
===================================================================
--- core/trunk/exo.core.component.organization.jdbc/pom.xml	2011-11-07 16:37:38 UTC (rev 5168)
+++ core/trunk/exo.core.component.organization.jdbc/pom.xml	2011-11-08 07:47:11 UTC (rev 5169)
@@ -99,10 +99,78 @@
          <scope>test</scope>
       </dependency>
    </dependencies>
+   
    <build>
       <plugins>
          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+               <!--
+               We have no unit tests, we run TCK tests instead. 
+               So we skip default unit tests.
+               -->
+               <skip>true</skip>
+               <!-- Common configuration for both jdbc and hibernate
+               organization services.
+               -->
+               <argLine>${env.MAVEN_OPTS} -Djava.security.manager=org.exoplatform.commons.test.TestSecurityManager -Djava.security.policy=${project.build.directory}/test-classes/test.policy</argLine>
+               <includes>
+                  <include>org/exoplatform/services/tck/organization/Test*.java</include>
+               </includes>                 
+               <excludes>  
+                  <exclude>**/AbstractOrganizationServiceTest.java</exclude>
+                  <!--
+                  Some issues with cach make test to fail.
+                  -->
+                  <exclude>org/exoplatform/services/tck/organization/TestMembershipTypeEventListener.java</exclude>
+               </excludes> 
+            </configuration>
+            <executions>
+               <execution>
+                  <id>hibernate</id>
+                  <phase>test</phase>
+                  <goals>
+                    <goal>test</goal>
+                  </goals>
+                  <configuration>
+                    <skip>false</skip>
+                    <systemProperties>
+                       <property>
+                          <name>orgservice.test.configuration.file</name>
+                          <value>/conf/standalone/test-configuration-hibernate.xml</value>
+                       </property>
+                       <property>
+                          <name>orgservice.test.configuration.skipDateTests</name>
+                          <value>false</value>
+                       </property>
+                    </systemProperties>
+                 </configuration>
+               </execution>
+               <execution>
+                  <id>jdbc</id>
+                  <phase>test</phase>
+                  <goals>
+                    <goal>test</goal>
+                  </goals>
+                  <configuration>
+                    <skip>false</skip>
+                    <systemProperties>
+                       <property>
+                          <name>orgservice.test.configuration.file</name>
+                          <value>/conf/standalone/test-configuration-jdbc.xml</value>
+                       </property>
+                       <property>
+                          <name>orgservice.test.configuration.skipDateTests</name>
+                          <value>true</value>
+                       </property>
+                    </systemProperties>
+                 </configuration>
+               </execution>
+            </executions>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-dependency-plugin</artifactId>
             <executions>
                <execution>
@@ -125,39 +193,39 @@
                   </configuration>
                </execution>
             </executions>
-          </plugin>         
-          <plugin>
+         </plugin>         
+         <plugin>
             <groupId>org.codehaus.mojo</groupId>
-              <artifactId>build-helper-maven-plugin</artifactId>
-              <version>1.3</version>
-              <executions>
-                <execution>
+            <artifactId>build-helper-maven-plugin</artifactId>
+            <version>1.3</version>
+            <executions>
+               <execution>
                   <id>add-test-resource</id>
                   <phase>generate-test-sources</phase>
                   <goals>
-                    <goal>add-test-resource</goal>
+                     <goal>add-test-resource</goal>
                   </goals>
                   <configuration>
-                    <resources>
-                      <resource>
-                          <directory>${project.build.directory}/org-service-tck-tests</directory>
-                         <excludes>
-                         </excludes>
-                       </resource>
-                    </resources>
-                 </configuration>
-              </execution> 
-              <execution>
-              <id>add-test-source</id>
-                 <phase>generate-test-sources</phase>
-                 <goals>
-                    <goal>add-test-source</goal>
-                 </goals>
-                 <configuration>
-                    <sources>
-                      <source>${project.build.directory}/org-service-tck-tests</source>
-                    </sources>
-                 </configuration>
+                     <resources>
+                        <resource>
+                           <directory>${project.build.directory}/org-service-tck-tests</directory>
+                           <excludes>
+                           </excludes>
+                        </resource>
+                     </resources>
+                  </configuration>
+               </execution> 
+               <execution>
+                  <id>add-test-source</id>
+                  <phase>generate-test-sources</phase>
+                  <goals>
+                     <goal>add-test-source</goal>
+                  </goals>
+                  <configuration>
+                     <sources>
+                        <source>${project.build.directory}/org-service-tck-tests</source>
+                     </sources>
+                  </configuration>
                </execution>
             </executions>
          </plugin>
@@ -201,96 +269,5 @@
          </plugin>
       </plugins>
    </build>
-   <profiles>
-      <profile>
-         <id>hibernate</id>
-         <properties>
-            <orgservice.test.configuration.file>/conf/standalone/test-configuration-hibernate.xml</orgservice.test.configuration.file>
-         </properties>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.maven.plugins</groupId>
-                  <artifactId>maven-surefire-plugin</artifactId>
-                  <configuration>
-                     <argLine>${env.MAVEN_OPTS} -Djava.security.manager=org.exoplatform.commons.test.TestSecurityManager -Djava.security.policy=${project.build.directory}/test-classes/test.policy</argLine>
-                     <systemProperties>
-                        <!--
-                           This property defines TCK tests configuration file location
-                        -->
-                        <property>
-                           <name>orgservice.test.configuration.file</name>
-                           <value>${orgservice.test.configuration.file}</value>
-                        </property>
-                     </systemProperties>
-                     <includes>
-                        <include>org/exoplatform/services/tck/organization/Test*.java</include>
-                     </includes>                 
-                     <excludes>
-                        <!--
-                           Excluded as there some hibernate cache issues on pre-, postoperations
-                           (e.g. preDelete, postDelete, etc.)
-                        -->
-
-                        <exclude>org/exoplatform/services/tck/organization/TestMembershipTypeEventListener.java</exclude>
-
-                        <!--
-                           Excluded as this class has no tests to be run
-                        -->
-                        <exclude>**/AbstractOrganizationServiceTest.java</exclude>
-                     </excludes>  
-                  </configuration>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-      <profile>
-         <id>jdbc</id>
-         <activation>
-             <activeByDefault>true</activeByDefault>
-         </activation>
-         <properties>
-            <orgservice.test.configuration.file>/conf/standalone/test-configuration-jdbc.xml</orgservice.test.configuration.file>
-         </properties>
-         <build>
-           <plugins>
-           <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-               <argLine>${env.MAVEN_OPTS} -Djava.security.manager=org.exoplatform.commons.test.TestSecurityManager -Djava.security.policy=${project.build.directory}/test-classes/test.policy</argLine>
-               <systemProperties>
-                  <!--
-                     This property defines TCK tests configuration file location
-                  -->
-                  <property>
-                     <name>orgservice.test.configuration.file</name>
-                     <value>${orgservice.test.configuration.file}</value>
-                  </property>
-
-                  <property>
-                     <name>orgservice.test.configuration.skipDateTests</name>
-                     <value>true</value>
-                  </property>
-               </systemProperties>
-               <includes>
-                  <include>org/exoplatform/services/tck/organization/Test*.java</include>
-               </includes>                 
-               <excludes>  
-                  <!--
-                     Excluded as this class has no tests to be run
-                  -->
-                  <exclude>**/AbstractOrganizationServiceTest.java</exclude>
-
-                  <!--
-                     Some limitation of JDBC implementation of organization service
-                  -->
-                  <exclude>org/exoplatform/services/tck/organization/TestMembershipTypeEventListener.java</exclude>
-               </excludes>  
-            </configuration>
-         </plugin>
-         </plugins>
-         </build>
-      </profile>
-   </profiles>
+   
 </project>

Modified: core/trunk/exo.core.component.organization.jdbc/src/test/resources/conf/standalone/test-configuration-hibernate.xml
===================================================================
--- core/trunk/exo.core.component.organization.jdbc/src/test/resources/conf/standalone/test-configuration-hibernate.xml	2011-11-07 16:37:38 UTC (rev 5168)
+++ core/trunk/exo.core.component.organization.jdbc/src/test/resources/conf/standalone/test-configuration-hibernate.xml	2011-11-08 07:47:11 UTC (rev 5169)
@@ -46,7 +46,7 @@
         <description>Default Hibernate Service</description>
         <property name="hibernate.show_sql" value="false"/>
         <property name="hibernate.cglib.use_reflection_optimizer" value="true"/>
-        <property name="hibernate.connection.url" value="jdbc:hsqldb:file:target/temp/data/exodb"/>
+        <property name="hibernate.connection.url" value="jdbc:hsqldb:file:target/temp/data/exodb-hibernate"/>
         <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
         <property name="hibernate.connection.autocommit" value="true"/>
         <property name="hibernate.connection.username" value="sa"/>

Modified: core/trunk/exo.core.component.organization.jdbc/src/test/resources/conf/standalone/test-configuration-jdbc.xml
===================================================================
--- core/trunk/exo.core.component.organization.jdbc/src/test/resources/conf/standalone/test-configuration-jdbc.xml	2011-11-07 16:37:38 UTC (rev 5168)
+++ core/trunk/exo.core.component.organization.jdbc/src/test/resources/conf/standalone/test-configuration-jdbc.xml	2011-11-08 07:47:11 UTC (rev 5169)
@@ -73,7 +73,7 @@
             <name>connection.config</name>
             <description>Connection configuration</description>
             <property name='connection.driver' value='org.hsqldb.jdbcDriver' />
-            <property name='connection.url' value='jdbc:hsqldb:file:target/temp/data/exodb' />
+            <property name='connection.url' value='jdbc:hsqldb:file:target/temp/data/exodb-jdbc' />
             <property name='connection.login' value='sa' />
             <property name='connection.password' value='' />
             <property name='connection.min-size' value='3' />



More information about the exo-jcr-commits mailing list