8059870: RowsetFactoryTests & RowSetProviderTests failing
authorlancea
Wed, 08 Oct 2014 11:51:36 -0400
changeset 26968 cd59eb37868e
parent 26967 c182469301ee
child 26969 ca3ea2ba7c86
8059870: RowsetFactoryTests & RowSetProviderTests failing Reviewed-by: dfuchs
jdk/test/javax/sql/testng/TEST.properties
jdk/test/javax/sql/testng/jars/badFactory.jar
jdk/test/javax/sql/testng/jars/badFactory/META-INF/services/javax.sql.rowset.RowSetFactory
jdk/test/javax/sql/testng/jars/goodFactory.jar
jdk/test/javax/sql/testng/jars/goodFactory/META-INF/services/javax.sql.rowset.RowSetFactory
jdk/test/javax/sql/testng/test/rowset/RowSetFactoryTests.java
jdk/test/javax/sql/testng/test/rowset/RowSetProviderTests.java
--- a/jdk/test/javax/sql/testng/TEST.properties	Tue Oct 07 22:23:19 2014 -0700
+++ b/jdk/test/javax/sql/testng/TEST.properties	Wed Oct 08 11:51:36 2014 -0400
@@ -1,2 +1,3 @@
 # JDBC unit tests uses TestNG
-TestNG.dirs= .
\ No newline at end of file
+TestNG.dirs= .
+othervm.dirs= .
Binary file jdk/test/javax/sql/testng/jars/badFactory.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/jars/badFactory/META-INF/services/javax.sql.rowset.RowSetFactory	Wed Oct 08 11:51:36 2014 -0400
@@ -0,0 +1,1 @@
+invalid.RowSetFactoryImpl
Binary file jdk/test/javax/sql/testng/jars/goodFactory.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/jars/goodFactory/META-INF/services/javax.sql.rowset.RowSetFactory	Wed Oct 08 11:51:36 2014 -0400
@@ -0,0 +1,1 @@
+util.StubRowSetFactory
--- a/jdk/test/javax/sql/testng/test/rowset/RowSetFactoryTests.java	Tue Oct 07 22:23:19 2014 -0700
+++ b/jdk/test/javax/sql/testng/test/rowset/RowSetFactoryTests.java	Wed Oct 08 11:51:36 2014 -0400
@@ -50,7 +50,7 @@
      * Validate that the RowSetFactory returned by RowSetProvider.newFactory()
      * returns the correct RowSet implementations
      */
-    @Test(dataProvider = "RowSetValues", enabled = false)
+    @Test(dataProvider = "RowSetValues", enabled = true)
     public void test(RowSetFactory rsf, String impl) throws SQLException {
         validateRowSetImpl(rsf, impl);
     }
--- a/jdk/test/javax/sql/testng/test/rowset/RowSetProviderTests.java	Tue Oct 07 22:23:19 2014 -0700
+++ b/jdk/test/javax/sql/testng/test/rowset/RowSetProviderTests.java	Wed Oct 08 11:51:36 2014 -0400
@@ -109,7 +109,7 @@
      * Validate that the correct RowSetFactory is returned by newFactory()
      * when specified by the javax.sql.rowset.RowSetFactory property.
      */
-    @Test(enabled = false)
+    @Test(enabled = true)
     public void test02() throws SQLException {
         System.setProperty("javax.sql.rowset.RowSetFactory", STUB_FACTORY_CLASSNAME);
         validateProvider(RowSetProvider.newFactory(), STUB_FACTORY_CLASSNAME);
@@ -133,7 +133,7 @@
      */
     @Test
     public void test04() throws Exception {
-        File f = new File(jarPath + "goodFactory.jar");
+        File f = new File(jarPath + "goodFactory");
         URLClassLoader loader = new URLClassLoader(new URL[]{
             new URL(f.toURI().toString())}, getClass().getClassLoader());
         Thread.currentThread().setContextClassLoader(loader);
@@ -142,11 +142,11 @@
 
     /*
      * Validate that a SQLException is thrown by newFactory() if the default
-     * RowSetFactory specified by the ServlceLoader API is not valid
+     * RowSetFactory specified by the ServiceLoader API is not valid
      */
     @Test(expectedExceptions = SQLException.class)
     public void test05() throws Exception {
-        File f = new File(jarPath + "badFactory.jar");
+        File f = new File(jarPath + "badFactory");
         URLClassLoader loader = new URLClassLoader(new URL[]{
             new URL(f.toURI().toString())}, getClass().getClassLoader());
         Thread.currentThread().setContextClassLoader(loader);
@@ -177,12 +177,12 @@
     @DataProvider(name = "RowSetFactoryValues")
     private Object[][] RowSetFactoryValues() throws SQLException {
         RowSetFactory rsf = RowSetProvider.newFactory();
-        //RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
+        RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
         RowSetFactory rsf2 = RowSetProvider.newFactory(DEFFAULT_FACTORY_CLASSNAME, null);
         return new Object[][]{
             {rsf, NO_VALADATE_IMPL},
             {rsf, DEFFAULT_FACTORY_CLASSNAME},
-            // {rsf1, STUB_FACTORY_CLASSNAME},
+            {rsf1, STUB_FACTORY_CLASSNAME},
             {rsf2, DEFFAULT_FACTORY_CLASSNAME}
         };
     }