[teiid-commits] teiid SVN: r814 - in trunk: common-core/src/test/java/com/metamatrix/api/exception and 1 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue Apr 21 12:32:23 EDT 2009


Author: rareddy
Date: 2009-04-21 12:32:23 -0400 (Tue, 21 Apr 2009)
New Revision: 814

Modified:
   trunk/client-jdbc30/pom.xml
   trunk/common-core/src/test/java/com/metamatrix/api/exception/TestExceptionHolder.java
   trunk/common-core/src/test/java/com/metamatrix/core/util/UnitTestUtil.java
Log:
TEIID-177: adding language processors such that same code can be compiled aginst java 1.5 and java 1.6. Also between JDBC 4.0 and JDBC 3.0

Modified: trunk/client-jdbc30/pom.xml
===================================================================
--- trunk/client-jdbc30/pom.xml	2009-04-21 14:47:32 UTC (rev 813)
+++ trunk/client-jdbc30/pom.xml	2009-04-21 16:32:23 UTC (rev 814)
@@ -99,7 +99,6 @@
                             <goal>run</goal>
                         </goals>
                     </execution>
-                    <!-- 
                     <execution>
                         <id>generate-1.5-test</id>
                         <phase>generate-sources</phase>
@@ -149,7 +148,6 @@
                             <goal>run</goal>
                         </goals>
                     </execution>     
-                    -->               
                 </executions>
             </plugin>            
         </plugins>
@@ -162,7 +160,6 @@
               <include>**/*</include>
             </includes>
           </resource>
-          <!-- 
           <resource>
             <directory>${project.build.directory}/generated-sources/test/resources</directory>
             <filtering>false</filtering>
@@ -170,7 +167,6 @@
               <include>**/*</include>
             </includes>
           </resource>
-          -->
         </resources>   
              
     </build>  

Modified: trunk/common-core/src/test/java/com/metamatrix/api/exception/TestExceptionHolder.java
===================================================================
--- trunk/common-core/src/test/java/com/metamatrix/api/exception/TestExceptionHolder.java	2009-04-21 14:47:32 UTC (rev 813)
+++ trunk/common-core/src/test/java/com/metamatrix/api/exception/TestExceptionHolder.java	2009-04-21 16:32:23 UTC (rev 814)
@@ -10,6 +10,8 @@
 import java.sql.SQLException;
 import java.util.ArrayList;
 
+import junit.framework.TestCase;
+
 import org.junit.Test;
 
 import com.metamatrix.api.exception.ExceptionHolder;
@@ -19,8 +21,9 @@
 import com.metamatrix.core.util.ReflectionHelper;
 import com.metamatrix.core.util.UnitTestUtil;
 
-public class TestExceptionHolder {
-		
+public class TestExceptionHolder extends TestCase {
+	
+	//## JDBC4.0-begin ##		
 	@SuppressWarnings("all")
 	public static class BadException extends MetaMatrixProcessingException {
 		private Object obj;
@@ -95,4 +98,11 @@
         assertTrue(e instanceof MetaMatrixRuntimeException);
         assertEquals("Unknown Exception", e.getMessage()); //$NON-NLS-1$
 	}		
+	//## JDBC4.0-end ##
+	
+	/*## JDBC3.0-JDK1.5-begin ##
+	public void testPass(){
+	// since the jar files required are built with 1.6, it will always fail, so just comment the test for 1.5
+	} 
+	## JDBC3.0-JDK1.5-end ##*/
 }

Modified: trunk/common-core/src/test/java/com/metamatrix/core/util/UnitTestUtil.java
===================================================================
--- trunk/common-core/src/test/java/com/metamatrix/core/util/UnitTestUtil.java	2009-04-21 14:47:32 UTC (rev 813)
+++ trunk/common-core/src/test/java/com/metamatrix/core/util/UnitTestUtil.java	2009-04-21 16:32:23 UTC (rev 814)
@@ -43,7 +43,13 @@
 	
 	public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$
 
+	//## JDBC4.0-begin ##
 	private static final String DEFAULT_TESTDATA_PATH = "src/test/resources"; //$NON-NLS-1$
+	//## JDBC4.0-end ##
+
+	/*## JDBC3.0-JDK1.5-begin ##
+	private static final String DEFAULT_TESTDATA_PATH = "target/generated-sources/test/resources"; //$NON-NLS-1$ 
+	## JDBC3.0-JDK1.5-end ##*/
 	
 	private static final String DEFAULT_TEMP_DIR = "target/scratch"; //$NON-NLS-1$
 	




More information about the teiid-commits mailing list