aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2019-11-06 10:17:10 -0600
committerSonarTech <sonartech@sonarsource.com>2019-12-09 20:46:15 +0100
commit0a6525b3f63132a719e96a16233aef04fcf535cd (patch)
tree88eb3964daeb7fc97a4248b50c8fef999a2a38af /server
parent1b7c2ba7e13e675657f58d422d04d548d210da08 (diff)
downloadsonarqube-0a6525b3f63132a719e96a16233aef04fcf535cd.tar.gz
sonarqube-0a6525b3f63132a719e96a16233aef04fcf535cd.zip
SONAR-12668 Drop 'sonar.branch.target'
Diffstat (limited to 'server')
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/MergeAndTargetBranchComponentUuids.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssues.java3
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/webhook/ProjectAnalysisTest.java2
4 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/MergeAndTargetBranchComponentUuids.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/MergeAndTargetBranchComponentUuids.java
index 76268c9984e..22faf3f1d9b 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/MergeAndTargetBranchComponentUuids.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/MergeAndTargetBranchComponentUuids.java
@@ -34,7 +34,7 @@ import static com.google.common.base.Preconditions.checkState;
import static org.sonar.db.component.ComponentDto.removeBranchAndPullRequestFromKey;
/**
- * Cache a map between component keys and uuids in the merge branch and optionally the target branch (for PR and SLB, and only if this target branch is analyzed)
+ * Cache a map between component keys and uuids in the merge branch and optionally the target branch (for PRs, and only if this target branch is analyzed)
*/
public class MergeAndTargetBranchComponentUuids {
private final AnalysisMetadataHolder analysisMetadataHolder;
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssues.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssues.java
index 8378284069b..7dfad67d056 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssues.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssues.java
@@ -33,7 +33,7 @@ import org.sonar.db.component.KeyWithUuidDto;
import static org.sonar.db.component.ComponentDto.removeBranchAndPullRequestFromKey;
/**
- * Cache a map of component key -> set&lt;uuid&gt; in sibling branches/PR that have open issues
+ * Cache a map of component key -> set&lt;uuid&gt; in sibling PRs that have open issues
*/
public class SiblingComponentsWithOpenIssues {
private final DbClient dbClient;
@@ -60,6 +60,7 @@ public class SiblingComponentsWithOpenIssues {
uuidsByKey = new HashMap<>();
try (DbSession dbSession = dbClient.openSession(false)) {
+ // for the time being it still tries to load from short living branches
List<KeyWithUuidDto> components = dbClient.componentDao().selectAllSiblingComponentKeysHavingOpenIssues(dbSession, referenceBranchUuid, currentBranchUuid);
for (KeyWithUuidDto dto : components) {
uuidsByKey.computeIfAbsent(removeBranchAndPullRequestFromKey(dto.key()), s -> new HashSet<>()).add(dto.uuid());
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
index 84e259e03e8..d6bf03851e6 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
@@ -130,7 +130,7 @@ public class ComputeEngineContainerImplTest {
+ 27 // level 1
+ 65 // content of DaoModule
+ 3 // content of EsModule
- + 51 // content of CorePropertyDefinitions
+ + 50 // content of CorePropertyDefinitions
+ 1 // StopFlagContainer
);
assertThat(
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/webhook/ProjectAnalysisTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/webhook/ProjectAnalysisTest.java
index e7a0b26e214..d36f6137f87 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/webhook/ProjectAnalysisTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/webhook/ProjectAnalysisTest.java
@@ -148,6 +148,6 @@ public class ProjectAnalysisTest {
@Test
public void verify_toString() {
assertThat(underTest.toString()).isEqualTo(
- "ProjectAnalysis{project=Project{uuid='uuid', key='key', name='name'}, ceTask=CeTask{id='id', status=SUCCESS}, branch=Branch{main=true, name='name', type=SHORT}, qualityGate=EvaluatedQualityGate{qualityGate=QualityGate{id=id, name='name', conditions=[]}, status=ERROR, evaluatedConditions=[]}, updatedAt=1, properties={a=b}, analysis=Analysis{uuid='analysis_uuid', date=1500, revision=sha1}}");
+ "ProjectAnalysis{project=Project{uuid='uuid', key='key', name='name'}, ceTask=CeTask{id='id', status=SUCCESS}, branch=Branch{main=true, name='name', type=LONG}, qualityGate=EvaluatedQualityGate{qualityGate=QualityGate{id=id, name='name', conditions=[]}, status=ERROR, evaluatedConditions=[]}, updatedAt=1, properties={a=b}, analysis=Analysis{uuid='analysis_uuid', date=1500, revision=sha1}}");
}
}