Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-01-14 20:48:15 +0000
committerSteffen Pingel2012-01-14 20:48:15 +0000
commitfe5094eab7768e703fedf722eef8ad66a7e3772d (patch)
tree09f48b8bf2301976c15d90f94d4b762a1671546f
parent3c8980c5dee5179c54ed1d2c0c3d78d80fa2a492 (diff)
downloadorg.eclipse.mylyn.commons-fe5094eab7768e703fedf722eef8ad66a7e3772d.tar.gz
org.eclipse.mylyn.commons-fe5094eab7768e703fedf722eef8ad66a7e3772d.tar.xz
org.eclipse.mylyn.commons-fe5094eab7768e703fedf722eef8ad66a7e3772d.zip
RESOLVED - bug 367493: fix failing tests
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367493 Change-Id: I8895f911da37a093bf8eab714a0f0b6beb621d26
-rw-r--r--org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/CommonHttpClientTest.java6
-rw-r--r--org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/HttpUtilTest.java5
2 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/CommonHttpClientTest.java b/org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/CommonHttpClientTest.java
index 82aaa629..a58c5bd4 100644
--- a/org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/CommonHttpClientTest.java
+++ b/org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/CommonHttpClientTest.java
@@ -15,7 +15,7 @@ import static org.junit.Assert.assertEquals;
import java.io.IOException;
-import javax.net.ssl.SSLHandshakeException;
+import javax.net.ssl.SSLException;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
@@ -115,7 +115,7 @@ public class CommonHttpClientTest {
}
}
- @Test(expected = SSLHandshakeException.class)
+ @Test(expected = SSLException.class)
public void testCertificateAuthenticationNoCertificate() throws Exception {
RepositoryLocation location = new RepositoryLocation();
location.setUrl("https://mylyn.org/secure/index.txt");
@@ -126,7 +126,7 @@ public class CommonHttpClientTest {
HttpUtil.release(request, response, null);
}
- @Test(expected = SSLHandshakeException.class)
+ @Test(expected = SSLException.class)
public void testCertificateAuthenticationCertificate() throws Exception {
RepositoryLocation location = new RepositoryLocation();
location.setUrl("https://mylyn.org/secure/index.txt");
diff --git a/org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/HttpUtilTest.java b/org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/HttpUtilTest.java
index ff85ec8f..a2b82845 100644
--- a/org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/HttpUtilTest.java
+++ b/org.eclipse.mylyn.commons.repositories.http.tests/src/org/eclipse/mylyn/commons/repositories/http/tests/HttpUtilTest.java
@@ -67,13 +67,14 @@ public class HttpUtilTest {
@Test
public void testGetRequestPoolConnections() throws Exception {
- HttpRequestBase request = new HttpGet("http://" + proxyAddress.toString());
+ String url = "http://" + proxyAddress.getHostName() + ":" + proxyAddress.getPort() + "/";
+ HttpRequestBase request = new HttpGet(url);
HttpUtil.configureClient(client, null);
assertEquals(0, connectionManager.getConnectionsInPool());
HttpResponse response = HttpUtil.execute(client, null, request, null);
- assertEquals(HttpStatus.SC_NOT_FOUND, response.getStatusLine().getStatusCode());
+ assertEquals(HttpStatus.SC_SERVICE_UNAVAILABLE, response.getStatusLine().getStatusCode());
assertEquals(1, connectionManager.getConnectionsInPool());
}

Back to the top