]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10043 upgrade MsSQL JDBC driver to 6.2.22.jre8 2787/head
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 2 Nov 2017 10:51:19 +0000 (11:51 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 7 Nov 2017 08:07:16 +0000 (09:07 +0100)
pom.xml
sonar-application/src/main/assembly/conf/sonar.properties
tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java
tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java

diff --git a/pom.xml b/pom.xml
index 2eb5289e41177396426bafa63c580175ccddf54e..5c80969ce6043cd7ebd0e4c8fd6b1063ed4bdb48 100644 (file)
--- a/pom.xml
+++ b/pom.xml
       <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>
index de7aef6cef93629438d1598d74c2e2c2a1430f1e..c0b96b43810783e7145b82a022d4a50cb7b2ac15 100644 (file)
 # 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.
index a498d10644d93b0373ffacd78ef4efc005fe5200..98830cebbdc8dc6dfac649f5abb06e4940d85db6 100644 (file)
@@ -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());
   }
index 30f085e3706ff407ce4a7de39dadb8ec2a2bff8a..0154fcff7735626984a001bf9acfc242250c1829 100644 (file)
@@ -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));
   }