changeset 10859:f71379c4864f

8059870: RowsetFactoryTests & RowSetProviderTests failing Reviewed-by: dfuchs
author lancea
date Wed, 08 Oct 2014 11:51:36 -0400
parents 9a197e12ce42
children f6420ff4bc52
files test/javax/sql/testng/TEST.properties test/javax/sql/testng/jars/badFactory.jar test/javax/sql/testng/jars/badFactory/META-INF/services/javax.sql.rowset.RowSetFactory test/javax/sql/testng/jars/goodFactory.jar test/javax/sql/testng/jars/goodFactory/META-INF/services/javax.sql.rowset.RowSetFactory test/javax/sql/testng/test/rowset/RowSetFactoryTests.java test/javax/sql/testng/test/rowset/RowSetProviderTests.java
diffstat 7 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/sql/testng/TEST.properties	Tue Oct 07 22:23:19 2014 -0700
+++ b/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 test/javax/sql/testng/jars/badFactory.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/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 test/javax/sql/testng/jars/goodFactory.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/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/test/javax/sql/testng/test/rowset/RowSetFactoryTests.java	Tue Oct 07 22:23:19 2014 -0700
+++ b/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/test/javax/sql/testng/test/rowset/RowSetProviderTests.java	Tue Oct 07 22:23:19 2014 -0700
+++ b/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}
         };
     }