Author: dkulp
Date: Wed Apr 9 07:50:33 2008
New Revision: 646387
URL: http://svn.apache.org/viewvc?rev=646387&view=rev
Log:
Yet another attempt to get the MTOM/SwA tests to not fail the build on a
headless TeamCity enabled mac mini. If headless, we'll skip the tests that do
ImageIO stuff to hopefully avoid it causing the VM to just exit.
Modified:
incubator/cxf/trunk/parent/pom.xml
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwAServiceImpl.java
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
Modified: incubator/cxf/trunk/parent/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/parent/pom.xml?rev=646387&r1=646386&r2=646387&view=diff
==============================================================================
--- incubator/cxf/trunk/parent/pom.xml (original)
+++ incubator/cxf/trunk/parent/pom.xml Wed Apr 9 07:50:33 2008
@@ -256,7 +256,7 @@
<systemProperties>
<property>
<name>java.awt.headless</name>
- <value>true</value>
+ <value>${java.awt.headless}</value>
</property>
<property>
<name>java.util.logging.config.file</name>
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java?rev=646387&r1=646386&r2=646387&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java
Wed Apr 9 07:50:33 2008
@@ -52,7 +52,7 @@
@BeforeClass
public static void startServers() throws Exception {
- assertTrue("server did not launch correctly",
launchServer(Server.class));
+ assertTrue("server did not launch correctly",
launchServer(Server.class, true));
}
protected ByteArrayOutputStream setupInLogging() {
@@ -75,6 +75,10 @@
@Test
public void testDetail() throws Exception {
+ if (Boolean.getBoolean("java.awt.headless")) {
+ System.out.println("Running headless. Skipping test as Images may
not work.");
+ return;
+ }
ByteArrayOutputStream input = setupInLogging();
ByteArrayOutputStream output = setupOutLogging();
@@ -100,6 +104,10 @@
@Test
@org.junit.Ignore
public void testEcho() throws Exception {
+ if (Boolean.getBoolean("java.awt.headless")) {
+ System.out.println("Running headless. Skipping test as Images may
not work.");
+ return;
+ }
byte[] bytes = ImageHelper.getImageBytes(getImage("/java.jpg"),
"image/jpeg");
Holder<byte[]> image = new Holder<byte[]>(bytes);
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java?rev=646387&r1=646386&r2=646387&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java
Wed Apr 9 07:50:33 2008
@@ -42,11 +42,15 @@
@BeforeClass
public static void startServers() throws Exception {
- assertTrue("server did not launch correctly",
launchServer(Server.class));
+ assertTrue("server did not launch correctly",
launchServer(Server.class, true));
}
@Test
public void testDetail() throws Exception {
+ if (Boolean.getBoolean("java.awt.headless")) {
+ System.out.println("Running headless. Skipping test as Images may
not work.");
+ return;
+ }
Holder<byte[]> photo = new Holder<byte[]>("CXF".getBytes());
Holder<Image> image = new Holder<Image>(getImage("/java.jpg"));
port.detail(photo, image);
@@ -56,6 +60,10 @@
@Test
public void testEcho() throws Exception {
+ if (Boolean.getBoolean("java.awt.headless")) {
+ System.out.println("Running headless. Skipping test as Images may
not work.");
+ return;
+ }
byte[] bytes = ImageHelper.getImageBytes(getImage("/java.jpg"),
"image/jpeg");
Holder<byte[]> image = new Holder<byte[]>(bytes);
port.echoData(image);
@@ -64,6 +72,10 @@
@Test
public void testWithLocalTransport() throws Exception {
+ if (Boolean.getBoolean("java.awt.headless")) {
+ System.out.println("Running headless. Skipping test as Images may
not work.");
+ return;
+ }
Object implementor = new HelloImpl();
String address = "local://Hello";
Endpoint.publish(address, implementor);
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java?rev=646387&r1=646386&r2=646387&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
Wed Apr 9 07:50:33 2008
@@ -42,7 +42,7 @@
@BeforeClass
public static void startServers() throws Exception {
- assertTrue("server did not launch correctly",
launchServer(Server.class));
+ assertTrue("server did not launch correctly",
launchServer(Server.class, true));
}
@Test
@@ -134,6 +134,11 @@
@Test
public void testSwaTypes() throws Exception {
+ if (Boolean.getBoolean("java.awt.headless")) {
+ System.out.println("Running headless. Skipping test as Images may
not work.");
+ return;
+ }
+
SwAService service = new SwAService();
SwAServiceInterface port = service.getSwAServiceHttpPort();
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwAServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwAServiceImpl.java?rev=646387&r1=646386&r2=646387&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwAServiceImpl.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwAServiceImpl.java
Wed Apr 9 07:50:33 2008
@@ -96,7 +96,6 @@
Holder<DataHandler>
attach2, Holder<Source> attach3,
Holder<Image> attach4,
Holder<Image> attach5) {
try {
- System.out.println("Enter echoAllAttachmentTypes() ......");
OutputResponseAll theResponse = new OutputResponseAll();
theResponse.setResult("ok");
theResponse.setReason("ok");
@@ -141,7 +140,6 @@
}
theResponse.setResult("not ok");
}
- System.out.println("Leave echoAllAttachmentTypes() ......");
return theResponse;
} catch (Exception e) {
throw new WebServiceException(e.getMessage());
Modified:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java?rev=646387&r1=646386&r2=646387&view=diff
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
(original)
+++
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
Wed Apr 9 07:50:33 2008
@@ -328,7 +328,9 @@
cmd.add("-D" + entry.getKey() + "=" + entry.getValue());
}
}
- cmd.add("-Djava.awt.headless=true");
+ if (Boolean.getBoolean("java.awt.headless")) {
+ cmd.add("-Djava.awt.headless=true");
+ }
cmd.add("-ea");
cmd.add("-Djavax.xml.ws.spi.Provider=org.apache.cxf.bus.jaxws.spi.ProviderImpl");