Author: richard.opalka(a)jboss.com
Date: 2010-10-13 08:08:39 -0400 (Wed, 13 Oct 2010)
New Revision: 13108
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/config/ToolsSchemaConfigReaderTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java
Log:
fixing hudson regression - JBossXB exception propagation message changed - making tests
more reliable
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/config/ToolsSchemaConfigReaderTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/config/ToolsSchemaConfigReaderTestCase.java 2010-10-13
10:53:44 UTC (rev 13107)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/config/ToolsSchemaConfigReaderTestCase.java 2010-10-13
12:08:39 UTC (rev 13108)
@@ -21,7 +21,9 @@
*/
package org.jboss.test.ws.tools.config;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.io.PrintStream;
import java.util.List;
import org.jboss.ws.tools.Configuration;
@@ -70,7 +72,9 @@
}
catch (Exception ex)
{
- String msg = ex.getMessage();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ex.printStackTrace(new PrintStream(baos));
+ String msg = baos.toString();
assertTrue("Unexpected message: " + msg,
msg.indexOf("service-typo") > 0);
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java 2010-10-13
10:53:44 UTC (rev 13107)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java 2010-10-13
12:08:39 UTC (rev 13108)
@@ -21,7 +21,9 @@
*/
package org.jboss.test.ws.tools.jbws1080;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.io.PrintStream;
import org.jboss.ws.tools.WSTools;
import org.jboss.wsf.test.JBossWSTest;
@@ -47,7 +49,9 @@
}
catch (IOException e)
{
- assertTrue("Expected error",
e.getMessage().indexOf("'{\"http://www.jboss.org/jbossws-to...
is expected.") > -1);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ e.printStackTrace(new PrintStream(baos));
+ assertTrue("Expected error",
baos.toString().indexOf("'{\"http://www.jboss.org/jbossws-t...
is expected.") > -1);
}
}