changeset 40294:c75a04d91fda

8163535: javax/xml/jaxp/unittest/catalog/CatalogSupport2.java failed due to SocketTimeoutException Reviewed-by: lancea
author joehw
date Thu, 11 Aug 2016 13:34:30 -0700
parents 5cb21ed83e3d
children 0137b0d9934a
files jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogSupport2.java jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogSupport3.java
diffstat 2 files changed, 12 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogSupport2.java	Thu Aug 11 17:02:17 2016 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogSupport2.java	Thu Aug 11 13:34:30 2016 -0700
@@ -28,10 +28,8 @@
 import static jaxp.library.JAXPTestUtilities.setSystemProperty;
 
 import java.io.File;
-import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.StringReader;
-import java.net.SocketTimeoutException;
-
 import javax.xml.transform.Source;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.URIResolver;
@@ -52,7 +50,7 @@
 
 /*
  * @test
- * @bug 8158084 8162438 8162442
+ * @bug 8158084 8162438 8162442 8163535
  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
  * @run testng/othervm -DrunSecMngr=true catalog.CatalogSupport2
  * @run testng/othervm catalog.CatalogSupport2
@@ -97,7 +95,7 @@
     /*
        Verifies the Catalog support on SAXParser.
     */
-    @Test(dataProvider = "data_SAXC", expectedExceptions = FileNotFoundException.class)
+    @Test(dataProvider = "data_SAXC", expectedExceptions = IOException.class)
     public void testSAXC(boolean setUseCatalog, boolean useCatalog, String catalog, String
             xml, MyHandler handler, String expected) throws Exception {
         testSAX(setUseCatalog, useCatalog, catalog, xml, handler, expected);
@@ -106,7 +104,7 @@
     /*
        Verifies the Catalog support on XMLReader.
     */
-    @Test(dataProvider = "data_SAXC", expectedExceptions = FileNotFoundException.class)
+    @Test(dataProvider = "data_SAXC", expectedExceptions = IOException.class)
     public void testXMLReaderC(boolean setUseCatalog, boolean useCatalog, String catalog,
             String xml, MyHandler handler, String expected) throws Exception {
         testXMLReader(setUseCatalog, useCatalog, catalog, xml, handler, expected);
@@ -124,7 +122,7 @@
     /*
        Verifies the Catalog support on DOM parser.
     */
-    @Test(dataProvider = "data_DOMC", expectedExceptions = {FileNotFoundException.class, SocketTimeoutException.class})
+    @Test(dataProvider = "data_DOMC", expectedExceptions = IOException.class)
     public void testDOMC(boolean setUseCatalog, boolean useCatalog, String catalog,
             String xml, MyHandler handler, String expected) throws Exception {
         testDOM(setUseCatalog, useCatalog, catalog, xml, handler, expected);
@@ -141,7 +139,7 @@
         testValidation(setUseCatalog, useCatalog, catalog, xsd, resolver) ;
     }
 
-    @Test(dataProvider = "data_ValidatorC", expectedExceptions = {SAXException.class, FileNotFoundException.class})
+    @Test(dataProvider = "data_ValidatorC", expectedExceptions = {SAXException.class, IOException.class})
     public void testValidatorC(boolean setUseCatalog1, boolean setUseCatalog2, boolean useCatalog,
             Source source, LSResourceResolver resolver1, LSResourceResolver resolver2,
             String catalog1, String catalog2)
--- a/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogSupport3.java	Thu Aug 11 17:02:17 2016 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogSupport3.java	Thu Aug 11 13:34:30 2016 -0700
@@ -27,10 +27,8 @@
 import static jaxp.library.JAXPTestUtilities.setSystemProperty;
 
 import java.io.File;
-import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.StringReader;
-import java.net.SocketTimeoutException;
-
 import javax.xml.transform.Source;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.URIResolver;
@@ -51,7 +49,7 @@
 
 /*
  * @test
- * @bug 8158084 8162438 8162442
+ * @bug 8158084 8162438 8162442 8163535
  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
  * @run testng/othervm -DrunSecMngr=true catalog.CatalogSupport3
  * @run testng/othervm catalog.CatalogSupport3
@@ -93,7 +91,7 @@
     /*
        Verifies the Catalog support on SAXParser.
     */
-    @Test(dataProvider = "data_SAXC", expectedExceptions = FileNotFoundException.class)
+    @Test(dataProvider = "data_SAXC", expectedExceptions = IOException.class)
     public void testSAXC(boolean setUseCatalog, boolean useCatalog, String catalog,
             String xml, MyHandler handler, String expected) throws Exception {
         testSAX(setUseCatalog, useCatalog, catalog, xml, handler, expected);
@@ -102,7 +100,7 @@
     /*
        Verifies the Catalog support on XMLReader.
     */
-    @Test(dataProvider = "data_SAXC", expectedExceptions = FileNotFoundException.class)
+    @Test(dataProvider = "data_SAXC", expectedExceptions = IOException.class)
     public void testXMLReaderC(boolean setUseCatalog, boolean useCatalog, String catalog,
             String xml, MyHandler handler, String expected) throws Exception {
         testXMLReader(setUseCatalog, useCatalog, catalog, xml, handler, expected);
@@ -120,7 +118,7 @@
     /*
        Verifies the Catalog support on DOM parser.
     */
-    @Test(dataProvider = "data_DOMC", expectedExceptions = {FileNotFoundException.class, SocketTimeoutException.class})
+    @Test(dataProvider = "data_DOMC", expectedExceptions = IOException.class)
     public void testDOMC(boolean setUseCatalog, boolean useCatalog, String catalog,
             String xml, MyHandler handler, String expected) throws Exception {
         testDOM(setUseCatalog, useCatalog, catalog, xml, handler, expected);
@@ -141,7 +139,7 @@
        @bug 8158084 8162438 these tests also verifies the fix for 8162438
        Verifies the Catalog support on the Schema Validator.
     */
-    @Test(dataProvider = "data_ValidatorC", expectedExceptions = {SAXException.class, FileNotFoundException.class})
+    @Test(dataProvider = "data_ValidatorC", expectedExceptions = {SAXException.class, IOException.class})
     public void testValidatorC(boolean setUseCatalog1, boolean setUseCatalog2, boolean useCatalog,
             Source source, LSResourceResolver resolver1, LSResourceResolver resolver2,
             String catalog1, String catalog2)