aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Eck II2012-08-01 13:14:30 (EDT)
committerTim Eck II2012-08-01 13:14:30 (EDT)
commit559a676960147547731bb155b5d560b6df00788f (patch)
tree4d8db6746a556caea7b1790c9c51ed75babde99d
parent1640679a34d0948efbd93eb5284ff353b7c0cbab (diff)
downloadorg.eclipse.lyo.testsuite-559a676960147547731bb155b5d560b6df00788f.zip
org.eclipse.lyo.testsuite-559a676960147547731bb155b5d560b6df00788f.tar.gz
org.eclipse.lyo.testsuite-559a676960147547731bb155b5d560b6df00788f.tar.bz2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385321
-rw-r--r--org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/CreationAndUpdateXmlTests.java1
-rw-r--r--org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateBase.java6
-rw-r--r--org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateRdfXmlTests.java8
-rw-r--r--org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateXmlTests.java9
-rw-r--r--org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseJsonTests.java1
-rw-r--r--org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseRdfXmlTests.java4
-rw-r--r--org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseXmlTests.java4
7 files changed, 9 insertions, 24 deletions
diff --git a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/CreationAndUpdateXmlTests.java b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/CreationAndUpdateXmlTests.java
index e438e77..c734634 100644
--- a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/CreationAndUpdateXmlTests.java
+++ b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/CreationAndUpdateXmlTests.java
@@ -22,7 +22,6 @@ import java.util.Collection;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathException;
-import org.eclipse.lyo.testsuite.oslcv2.TestsBase;
import org.eclipse.lyo.testsuite.server.util.OSLCConstants;
import org.junit.Before;
import org.junit.Test;
diff --git a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateBase.java b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateBase.java
index 91bc48d..69fb4b3 100644
--- a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateBase.java
+++ b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateBase.java
@@ -67,14 +67,12 @@ public class GetAndUpdateBase extends AssetTestBase {
HttpResponse resp = OSLCUtils.postDataToUrl(
artifactFactory, basicCreds, acceptType, setupProps.getProperty("artifactContentType"),
readFileFromProperty("artifactFile"), addHeader(h));
- try {
- EntityUtils.consume(resp.getEntity());
- } catch (IOException e) { };
+ EntityUtils.consume(resp.getEntity());
assertTrue("Expected "+HttpStatus.SC_OK + ", received " + resp.getStatusLine().getStatusCode(),
resp.getStatusLine().getStatusCode() == HttpStatus.SC_CREATED);
assertTrue("No Location header", resp.getFirstHeader("Location") != null);
- assertTrue("No content length header", resp.getFirstHeader("Content-Length") != null);
+ //assertTrue("No content length header", resp.getFirstHeader("Content-Length") != null);
return resp.getFirstHeader("Location").getValue();
}
diff --git a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateRdfXmlTests.java b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateRdfXmlTests.java
index c8adb01..78575d3 100644
--- a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateRdfXmlTests.java
+++ b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateRdfXmlTests.java
@@ -104,9 +104,7 @@ public class GetAndUpdateRdfXmlTests extends GetAndUpdateBase {
HttpResponse resp = OSLCUtils.postDataToUrl(artifactFactory, basicCreds,
OSLCConstants.CT_RDF, null, artifact, header);
- try {
- EntityUtils.consume(resp.getEntity());
- } catch (IOException e) { }
+ EntityUtils.consume(resp.getEntity());
assertTrue("Expected: " + HttpStatus.SC_CREATED + ", received: " + resp.getStatusLine().getStatusCode(),
HttpStatus.SC_CREATED == resp.getStatusLine().getStatusCode());
}
@@ -141,9 +139,7 @@ public class GetAndUpdateRdfXmlTests extends GetAndUpdateBase {
// Adds the artifact to the asset
HttpResponse resp = OSLCUtils.postDataToUrl(artifactFactory, basicCreds,
OSLCConstants.CT_RDF, "text/xml", artifact, header);
- try {
- EntityUtils.consume(resp.getEntity());
- } catch (IOException e) { }
+ EntityUtils.consume(resp.getEntity());
// Gets the asset with the artifact added to it
resp = getAssetResponse();
diff --git a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateXmlTests.java b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateXmlTests.java
index 0606816..b8edd4f 100644
--- a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateXmlTests.java
+++ b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/GetAndUpdateXmlTests.java
@@ -103,9 +103,8 @@ public class GetAndUpdateXmlTests extends GetAndUpdateBase {
HttpResponse response = OSLCUtils.postDataToUrl(artifactFactory, basicCreds,
OSLCConstants.CT_XML, OSLCConstants.CT_XML, artifact, header);
- try {
- EntityUtils.consume(response.getEntity());
- } catch (IOException e) { }
+
+ EntityUtils.consume(response.getEntity());
assertTrue("Expected "+HttpStatus.SC_CREATED + ", received " + response.getStatusLine().getStatusCode(),
response.getStatusLine().getStatusCode() == HttpStatus.SC_CREATED);
}
@@ -139,9 +138,7 @@ public class GetAndUpdateXmlTests extends GetAndUpdateBase {
// Adds the artifact to the asset
HttpResponse response = OSLCUtils.postDataToUrl(artifactFactory, basicCreds,
OSLCConstants.CT_XML, OSLCConstants.CT_XML, artifact, header);
- try {
- EntityUtils.consume(response.getEntity());
- } catch (IOException e) { }
+ EntityUtils.consume(response.getEntity());
// Gets the asset with the artifact added to it
String resp = getAssetAsString();
diff --git a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseJsonTests.java b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseJsonTests.java
index 0baddfd..6ea0a4c 100644
--- a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseJsonTests.java
+++ b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseJsonTests.java
@@ -102,7 +102,6 @@ public class UsageCaseJsonTests extends UsageCaseBase {
response.getStatusLine().getStatusCode() == HttpStatus.SC_CREATED);
assertTrue("No Location header", response.getFirstHeader("Location") != null);
- assertTrue("No content length header", response.getFirstHeader("Content-Length") != null);
// Updates the artifacts subject
resp = getAssetAsString();
diff --git a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseRdfXmlTests.java b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseRdfXmlTests.java
index 2815045..7fb9390 100644
--- a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseRdfXmlTests.java
+++ b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseRdfXmlTests.java
@@ -121,9 +121,7 @@ public class UsageCaseRdfXmlTests extends UsageCaseBase {
resp = OSLCUtils.postDataToUrl(artifactFactory, basicCreds,
OSLCConstants.CT_RDF, null, artifact, header);
- try {
- EntityUtils.consume(resp.getEntity());
- } catch (IOException e) { }
+ EntityUtils.consume(resp.getEntity());
assertTrue("Expected: " + HttpStatus.SC_CREATED + ", received: " + resp.getStatusLine().getStatusCode(),
HttpStatus.SC_CREATED == resp.getStatusLine().getStatusCode());
diff --git a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseXmlTests.java b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseXmlTests.java
index f44a74a..1e5001e 100644
--- a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseXmlTests.java
+++ b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/oslcv2/asset/UsageCaseXmlTests.java
@@ -101,9 +101,7 @@ public class UsageCaseXmlTests extends UsageCaseBase {
HttpResponse response = OSLCUtils.postDataToUrl(artifactFactory, basicCreds,
OSLCConstants.CT_XML, OSLCConstants.CT_XML, artifact, header);
- try {
- EntityUtils.consume(response.getEntity());
- } catch (IOException e) { }
+ EntityUtils.consume(response.getEntity());
assertTrue("Expected "+HttpStatus.SC_OK + ", received " + response.getStatusLine().getStatusCode(),
response.getStatusLine().getStatusCode() == HttpStatus.SC_CREATED);