aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-11-02 11:51:19 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-11-07 09:07:16 +0100
commitb0d4c4e2f9265d15eba3cbbf74a99f4874442562 (patch)
tree088ef09b0b0b7e96d2c16206dc3363c9a5bad742
parent2158d36679b1bb1ba72eb53093cdcebe6b9d272e (diff)
downloadsonarqube-b0d4c4e2f9265d15eba3cbbf74a99f4874442562.tar.gz
sonarqube-b0d4c4e2f9265d15eba3cbbf74a99f4874442562.zip
SONAR-10043 upgrade MsSQL JDBC driver to 6.2.22.jre8
-rw-r--r--pom.xml2
-rw-r--r--sonar-application/src/main/assembly/conf/sonar.properties3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java7
4 files changed, 6 insertions, 9 deletions
diff --git a/pom.xml b/pom.xml
index 2eb5289e411..5c80969ce60 100644
--- a/pom.xml
+++ b/pom.xml
@@ -913,7 +913,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
- <version>6.1.0.jre8</version>
+ <version>6.2.2.jre8</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
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<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));
}