8059882: Disable RowSetFactory and RowSetProviderTests which are failing due to agentvm mode
Reviewed-by: darcy
--- a/jdk/test/javax/sql/testng/test/rowset/RowSetFactoryTests.java Tue Oct 07 14:49:45 2014 +0200
+++ b/jdk/test/javax/sql/testng/test/rowset/RowSetFactoryTests.java Tue Oct 07 14:03:43 2014 -0400
@@ -50,7 +50,7 @@
* Validate that the RowSetFactory returned by RowSetProvider.newFactory()
* returns the correct RowSet implementations
*/
- @Test(dataProvider = "RowSetValues")
+ @Test(dataProvider = "RowSetValues", enabled = false)
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 14:49:45 2014 +0200
+++ b/jdk/test/javax/sql/testng/test/rowset/RowSetProviderTests.java Tue Oct 07 14:03:43 2014 -0400
@@ -54,7 +54,8 @@
private static String jarPath;
/*
- * Save off the original property value for javax.sql.rowset.RowSetFactory
+ * Save off the original property value for javax.sql.rowset.RowSetFactory,
+ * original classloader and define the path to the jars directory
*/
@BeforeClass
public static void setUpClass() throws Exception {
@@ -76,7 +77,8 @@
}
/*
- * Clear the javax.sql.rowset.RowSetFactory property value
+ * Clear the javax.sql.rowset.RowSetFactory property value and
+ * reset the classloader to its original value
*/
@AfterMethod
public void tearDownMethod() throws Exception {
@@ -107,8 +109,8 @@
* Validate that the correct RowSetFactory is returned by newFactory()
* when specified by the javax.sql.rowset.RowSetFactory property.
*/
- @Test
- public void test2() throws SQLException {
+ @Test(enabled = false)
+ public void test02() throws SQLException {
System.setProperty("javax.sql.rowset.RowSetFactory", STUB_FACTORY_CLASSNAME);
validateProvider(RowSetProvider.newFactory(), STUB_FACTORY_CLASSNAME);
}
@@ -119,7 +121,7 @@
* javax.sql.rowset.RowSetFactory property is not valid.
*/
@Test(expectedExceptions = SQLException.class)
- public void test3() throws SQLException {
+ public void test03() throws SQLException {
System.setProperty("javax.sql.rowset.RowSetFactory",
"invalid.RowSetFactoryImpl");
RowSetFactory rsf = RowSetProvider.newFactory();
@@ -130,7 +132,7 @@
* when specified by the ServiceLoader API.
*/
@Test
- public void test4() throws Exception {
+ public void test04() throws Exception {
File f = new File(jarPath + "goodFactory.jar");
URLClassLoader loader = new URLClassLoader(new URL[]{
new URL(f.toURI().toString())}, getClass().getClassLoader());
@@ -140,16 +142,15 @@
/*
* Validate that a SQLException is thrown by newFactory() if the default
- *RowSetFactory specified by the ServlceLoader API is not valid
+ * RowSetFactory specified by the ServlceLoader API is not valid
*/
@Test(expectedExceptions = SQLException.class)
- public void test5() throws Exception {
+ public void test05() throws Exception {
File f = new File(jarPath + "badFactory.jar");
URLClassLoader loader = new URLClassLoader(new URL[]{
new URL(f.toURI().toString())}, getClass().getClassLoader());
Thread.currentThread().setContextClassLoader(loader);
RowSetProvider.newFactory();
-
}
/*
@@ -167,7 +168,6 @@
break;
default:
}
-
}
/*
@@ -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}
};
}