]> source.dussan.org Git - sonarqube.git/commitdiff
Fix instability of integration tests on Oracle
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 2 Oct 2017 20:46:34 +0000 (22:46 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 2 Oct 2017 20:46:34 +0000 (22:46 +0200)
A SonarQube server is hardly stopped when JVM process shutdowns. JDBC
connections are kept open. These orphan connections are correctly
closed by all databases except Oracle.

tests/src/test/java/org/sonarqube/tests/branch/BranchTest.java

index 7403df0163e864533f6e77ea24330cf81376e81a..13dcb0b396f9abaaacaa451dfe82be38ae397d22 100644 (file)
@@ -26,7 +26,7 @@ import org.assertj.core.groups.Tuple;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.tests.Category1Suite;
+import org.sonarqube.tests.Category2Suite;
 import org.sonarqube.tests.Tester;
 import org.sonarqube.ws.Common;
 import org.sonarqube.ws.WsBranches;
@@ -40,7 +40,7 @@ import static util.ItUtils.runProjectAnalysis;
 public class BranchTest {
 
   @ClassRule
-  public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR;
+  public static Orchestrator orchestrator = Category2Suite.ORCHESTRATOR;
 
   @Rule
   public Tester tester = new Tester(orchestrator).disableOrganizations();
@@ -58,7 +58,7 @@ public class BranchTest {
 
   @Test
   public void navigation_global_return_branches_support_to_false() {
-    WsResponse status =tester.wsClient().wsConnector().call(new GetRequest("api/navigation/global"));
+    WsResponse status = tester.wsClient().wsConnector().call(new GetRequest("api/navigation/global"));
     Map<String, Object> statusMap = ItUtils.jsonToMap(status.content());
 
     assertThat(statusMap.get("branchesEnabled")).isEqualTo(false);