From 2e7b3147b278485e344d84261228fdd25e02ff87 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Thu, 2 Nov 2017 11:51:19 +0100 Subject: [PATCH] SONAR-10043 upgrade MsSQL JDBC driver to 6.2.22.jre8 --- pom.xml | 2 +- sonar-application/src/main/assembly/conf/sonar.properties | 3 +-- .../org/sonarqube/tests/telemetry/TelemetryOptOutTest.java | 3 +-- .../org/sonarqube/tests/telemetry/TelemetryUploadTest.java | 7 +++---- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 1ddbe3b45df..4ba67554127 100644 --- a/pom.xml +++ b/pom.xml @@ -913,7 +913,7 @@ com.microsoft.sqlserver mssql-jdbc - 6.1.0.jre8 + 6.2.2.jre8 mysql diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties index de7aef6cef9..c0b96b43810 100644 --- a/sonar-application/src/main/assembly/conf/sonar.properties +++ b/sonar-application/src/main/assembly/conf/sonar.properties @@ -42,10 +42,9 @@ # Use the following connection string if you want to use integrated security with Microsoft Sql Server # Do not set sonar.jdbc.username or sonar.jdbc.password property if you are using Integrated Security # For Integrated Security to work, you have to download the Microsoft SQL JDBC driver package from -# http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774 +# https://www.microsoft.com/en-us/download/details.aspx?id=55539 # and copy sqljdbc_auth.dll to your path. You have to copy the 32 bit or 64 bit version of the dll # depending upon the architecture of your server machine. -# This version of SonarQube has been tested with Microsoft SQL JDBC version 4.1 #sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true # Use the following connection string if you want to use SQL Auth while connecting to MS Sql Server. 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 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 json = jsonToMap(request.getBody().readUtf8()); assertThat(json.get("id")).isEqualTo(serverId()); Map database = (Map) 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> projectCountByLanguage = (List>) json.get("projectCountByLanguage"); + List> projectCountByLanguage = (List>) json.get("projectCountByLanguage"); assertThat(projectCountByLanguage).extracting(p -> p.get("language"), p -> getInteger(p.get("count"))) .contains(tuple("xoo", 2), tuple("xoo2", 1)); - List> nclocByLanguage = (List>) json.get("nclocByLanguage"); + List> nclocByLanguage = (List>) json.get("nclocByLanguage"); assertThat(nclocByLanguage).extracting(p -> p.get("language"), p -> getInteger(p.get("ncloc"))) .contains(tuple("xoo", 13 * 2), tuple("xoo2", 7)); } -- 2.39.5