Author: dkulp
Date: Thu Nov 15 18:29:43 2012
New Revision: 1409908
URL: http://svn.apache.org/viewvc?rev=1409908&view=rev
Log:
Java6 handles headless images much better (well, it actually handles them), at
least on OSX and Linux.
Re-enable those tests on trunk since we no-longer support java5 there.
Modified:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java
cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
Modified:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java?rev=1409908&r1=1409907&r2=1409908&view=diff
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
(original)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
Thu Nov 15 18:29:43 2012
@@ -366,11 +366,7 @@ public class JAXRSMultipartTest extends
"/org/apache/cxf/systest/jaxrs/resources/book.xsd"));
xop.setAttachinfo2(bookXsd.getBytes());
- if (Boolean.getBoolean("java.awt.headless")) {
- System.out.println("Running headless. Ignoring an Image
property.");
- } else {
-
xop.setImage(getImage("/org/apache/cxf/systest/jaxrs/resources/java.jpg"));
- }
+
xop.setImage(getImage("/org/apache/cxf/systest/jaxrs/resources/java.jpg"));
XopType xop2 = client.post(xop, XopType.class);
Modified:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java?rev=1409908&r1=1409907&r2=1409908&view=diff
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
(original)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
Thu Nov 15 18:29:43 2012
@@ -100,12 +100,8 @@ public class MultipartStore {
xop.setAttachinfo2(bookXsd.getBytes());
- if (Boolean.getBoolean("java.awt.headless")) {
- System.out.println("Running headless. Ignoring an Image
property.");
- } else {
- xop.setImage(ImageIO.read(getClass().getResource(
+ xop.setImage(ImageIO.read(getClass().getResource(
"/org/apache/cxf/systest/jaxrs/resources/java.jpg")));
- }
return xop;
}
Modified:
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java?rev=1409908&r1=1409907&r2=1409908&view=diff
==============================================================================
---
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
(original)
+++
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
Thu Nov 15 18:29:43 2012
@@ -75,10 +75,6 @@ public class ClientServerSwaTest extends
assertEquals("testfoobar", string);
assertEquals("Hi", textHolder.value);
- if (Boolean.getBoolean("java.awt.headless")) {
- return;
- }
-
URL url1 = this.getClass().getResource("resources/attach.text");
URL url2 = this.getClass().getResource("resources/attach.html");
URL url3 = this.getClass().getResource("resources/attach.xml");
@@ -188,11 +184,6 @@ public class ClientServerSwaTest extends
@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();
@@ -232,11 +223,6 @@ public class ClientServerSwaTest extends
@Test
public void testSwaTypesWithDispatchAPI() throws Exception {
- if (Boolean.getBoolean("java.awt.headless")) {
- System.out.println("Running headless. Skipping test as Images may
not work.");
- return;
- }
-
URL url1 = this.getClass().getResource("resources/attach.text");
URL url2 = this.getClass().getResource("resources/attach.html");
URL url3 = this.getClass().getResource("resources/attach.xml");
Modified:
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java?rev=1409908&r1=1409907&r2=1409908&view=diff
==============================================================================
---
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java
(original)
+++
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_bindingtype/MTOMBindingTypeTest.java
Thu Nov 15 18:29:43 2012
@@ -76,10 +76,6 @@ public class MTOMBindingTypeTest extends
@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();
@@ -105,10 +101,6 @@ public class MTOMBindingTypeTest extends
@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:
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java?rev=1409908&r1=1409907&r2=1409908&view=diff
==============================================================================
---
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java
(original)
+++
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_feature/MtomFeatureClientServerTest.java
Thu Nov 15 18:29:43 2012
@@ -57,10 +57,6 @@ public class MtomFeatureClientServerTest
@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);
@@ -70,10 +66,6 @@ public class MtomFeatureClientServerTest
@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);
@@ -82,10 +74,6 @@ public class MtomFeatureClientServerTest
@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:
cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java?rev=1409908&r1=1409907&r2=1409908&view=diff
==============================================================================
---
cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
(original)
+++
cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
Thu Nov 15 18:29:43 2012
@@ -372,9 +372,6 @@ public class ServerLauncher {
for (Map.Entry<Object, Object> entry :
TestUtil.getAllPorts().entrySet()) {
cmd.add("-D" + entry.getKey() + "=" + entry.getValue());
}
- if (Boolean.getBoolean("java.awt.headless")) {
- cmd.add("-Djava.awt.headless=true");
- }
String vmargs = System.getProperty("server.launcher.vmargs");
if (StringUtils.isEmpty(vmargs)) {
cmd.add("-ea");