aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-09-30 17:45:29 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-09-30 17:46:10 +0200
commit05b1172fa916ff7b0d2373eacb761df6613f89fb (patch)
tree6c0bdead1f6392f082a714edc8db7c5c07d748d5
parenta06e719ca8456869902d57a15a0c430fa16be8ca (diff)
downloadsonarqube-05b1172fa916ff7b0d2373eacb761df6613f89fb.tar.gz
sonarqube-05b1172fa916ff7b0d2373eacb761df6613f89fb.zip
Fix timeout issue and speed up UT on my box
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java
index 562c6f48b86..c2110a2b365 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java
@@ -186,7 +186,7 @@ public class HttpDownloader extends UriReader.SchemeProcessor implements BatchCo
List<String> descriptions = Lists.newArrayList();
for (Proxy proxy : proxies) {
if (proxy.type() != Proxy.Type.DIRECT) {
- descriptions.add("proxy: " + proxy.address());
+ descriptions.add(proxy.type() + " proxy: " + proxy.address());
}
}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java
index 6380b849dbd..fa9d2edc866 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java
@@ -213,7 +213,7 @@ public class HttpDownloaderTest {
public void shouldGetProxySynthesis() throws URISyntaxException {
ProxySelector proxySelector = mock(ProxySelector.class);
when(proxySelector.select(any(URI.class))).thenReturn(Arrays.<Proxy>asList(new FakeProxy()));
- assertThat(HttpDownloader.BaseHttpDownloader.getProxySynthesis(new URI("http://an_url"), proxySelector)).isEqualTo("proxy: http://proxy_url:4040");
+ assertThat(HttpDownloader.BaseHttpDownloader.getProxySynthesis(new URI("http://an_url"), proxySelector)).isEqualTo("HTTP proxy: /123.45.67.89:4040");
}
@Test
@@ -230,6 +230,6 @@ public class HttpDownloaderTest {
class FakeProxy extends Proxy {
public FakeProxy() {
- super(Type.HTTP, new InetSocketAddress("http://proxy_url", 4040));
+ super(Type.HTTP, new InetSocketAddress("123.45.67.89", 4040));
}
}