Author: thomas.diesler(a)jboss.com
Date: 2007-01-27 04:09:46 -0500 (Sat, 27 Jan 2007)
New Revision: 2165
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1090/JBWS1090TestCase.java
Log:
Fix jdk14 test failures
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-27
08:15:19 UTC (rev 2164)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-27
09:09:46 UTC (rev 2165)
@@ -81,7 +81,10 @@
try
{
port.echoSimple("500");
- fail("socket timeout expected");
+
+ // Cannot set timeout (100) on http client transport as method not available
with JDK 1.4 (only JDK 1.5 or higher)
+ if
(!"1.4".equals(System.getProperty("java.specification.version")))
+ fail("WSTimeoutException expected");
}
catch (WSTimeoutException ex)
{
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1090/JBWS1090TestCase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1090/JBWS1090TestCase.java 2007-01-27
08:15:19 UTC (rev 2164)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1090/JBWS1090TestCase.java 2007-01-27
09:09:46 UTC (rev 2165)
@@ -24,10 +24,10 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
-import java.nio.channels.FileChannel;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.util.xml.DOMUtils;
+import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.tools.WSTools;
import org.w3c.dom.Element;
@@ -42,12 +42,12 @@
public void testWebServicesAppend() throws Exception
{
// create output dir
- File outputDir = new File("tools/jbws1090");
- outputDir.mkdirs();
+ new File("tools/jbws1090").mkdirs();
+
// copy webservices.xml fixture to output folder
- FileChannel src = new
FileInputStream("resources/tools/metadatafixture/webservices.xml").getChannel();
- FileChannel dest = new
FileOutputStream("tools/jbws1090/webservices.xml").getChannel();
- src.transferTo(0L, src.size(), dest);
+ FileInputStream src = new
FileInputStream("resources/tools/metadatafixture/webservices.xml");
+ FileOutputStream dest = new
FileOutputStream("tools/jbws1090/webservices.xml");
+ IOUtils.copyStream(dest, src);
src.close();
dest.close();