diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-11-02 11:51:19 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-11-07 09:07:16 +0100 |
commit | b0d4c4e2f9265d15eba3cbbf74a99f4874442562 (patch) | |
tree | 088ef09b0b0b7e96d2c16206dc3363c9a5bad742 /tests/src/test | |
parent | 2158d36679b1bb1ba72eb53093cdcebe6b9d272e (diff) | |
download | sonarqube-b0d4c4e2f9265d15eba3cbbf74a99f4874442562.tar.gz sonarqube-b0d4c4e2f9265d15eba3cbbf74a99f4874442562.zip |
SONAR-10043 upgrade MsSQL JDBC driver to 6.2.22.jre8
Diffstat (limited to 'tests/src/test')
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java | 3 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java index a498d10644d..98830cebbdc 100644 --- a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java +++ b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java @@ -22,7 +22,6 @@ package org.sonarqube.tests.telemetry; import com.sonar.orchestrator.Orchestrator; import java.util.Map; import java.util.concurrent.TimeUnit; -import javax.ws.rs.core.HttpHeaders; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; import org.junit.BeforeClass; @@ -65,7 +64,7 @@ public class TelemetryOptOutTest { RecordedRequest request = server.takeRequest(1, TimeUnit.SECONDS); assertThat(request.getMethod()).isEqualTo("DELETE"); - assertThat(request.getHeader(HttpHeaders.USER_AGENT)).contains("SonarQube"); + assertThat(request.getHeader("User-Agent")).contains("SonarQube"); Map<String, Object> json = jsonToMap(request.getBody().readUtf8()); assertThat(json.get("id")).isEqualTo(serverId()); } diff --git a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java index 30f085e3706..0154fcff773 100644 --- a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java +++ b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java @@ -23,7 +23,6 @@ import com.sonar.orchestrator.Orchestrator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import javax.ws.rs.core.HttpHeaders; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; import org.junit.After; @@ -79,7 +78,7 @@ public class TelemetryUploadTest { RecordedRequest request = telemetryServer.takeRequest(); assertThat(request.getMethod()).isEqualTo("POST"); - assertThat(request.getHeader(HttpHeaders.USER_AGENT)).contains("SonarQube"); + assertThat(request.getHeader("User-Agent")).contains("SonarQube"); Map<String, Object> json = jsonToMap(request.getBody().readUtf8()); assertThat(json.get("id")).isEqualTo(serverId()); Map<String, String> database = (Map<String, String>) json.get("database"); @@ -91,10 +90,10 @@ public class TelemetryUploadTest { assertThat(plugins).contains("xoo"); assertThat(getInteger(json.get("ncloc"))).isEqualTo(13 * 2 + 7); assertThat(getInteger(json.get("lines"))).isEqualTo(17 * 3); - List<Map<String, String>> projectCountByLanguage = (List<Map<String,String>>) json.get("projectCountByLanguage"); + List<Map<String, String>> projectCountByLanguage = (List<Map<String, String>>) json.get("projectCountByLanguage"); assertThat(projectCountByLanguage).extracting(p -> p.get("language"), p -> getInteger(p.get("count"))) .contains(tuple("xoo", 2), tuple("xoo2", 1)); - List<Map<String, String>> nclocByLanguage = (List<Map<String,String>>) json.get("nclocByLanguage"); + List<Map<String, String>> nclocByLanguage = (List<Map<String, String>>) json.get("nclocByLanguage"); assertThat(nclocByLanguage).extracting(p -> p.get("language"), p -> getInteger(p.get("ncloc"))) .contains(tuple("xoo", 13 * 2), tuple("xoo2", 7)); } |