aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-pushapi
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-webserver-pushapi')
-rw-r--r--server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImpl.java2
-rw-r--r--server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java16
2 files changed, 9 insertions, 9 deletions
diff --git a/server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImpl.java b/server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImpl.java
index 2e0e7f9b223..b73efa13e76 100644
--- a/server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImpl.java
+++ b/server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImpl.java
@@ -106,7 +106,7 @@ public class IssueChangeEventServiceImpl implements IssueChangeEventService {
IssueChangedEvent event = getIssueChangedEvent(projectKey, issuesInProject, issueChanges);
if (event != null) {
- persistEvent(event, entry.getValue().projectUuid());
+ persistEvent(event, entry.getValue().branchUuid());
}
}
}
diff --git a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java
index 4fd9b9626d2..e171ae1c4f0 100644
--- a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java
+++ b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java
@@ -143,13 +143,13 @@ public class IssueChangeEventServiceImplTest {
Set<DefaultIssue> issues = Set.of(defaultIssue1, defaultIssue2, issue3.toDefaultIssue());
Map<String, ComponentDto> projectsByUuid = new HashMap<>();
- projectsByUuid.put(componentDto1.projectUuid(), componentDto1);
- projectsByUuid.put(componentDto2.projectUuid(), componentDto2);
- projectsByUuid.put(componentDto3.projectUuid(), componentDto3);
+ projectsByUuid.put(componentDto1.branchUuid(), componentDto1);
+ projectsByUuid.put(componentDto2.branchUuid(), componentDto2);
+ projectsByUuid.put(componentDto3.branchUuid(), componentDto3);
Map<String, BranchDto> branchesByProjectUuid = new HashMap<>();
- branchesByProjectUuid.put(componentDto1.projectUuid(), branch1);
- branchesByProjectUuid.put(componentDto2.projectUuid(), branch2);
- branchesByProjectUuid.put(componentDto3.projectUuid(), branch3);
+ branchesByProjectUuid.put(componentDto1.branchUuid(), branch1);
+ branchesByProjectUuid.put(componentDto2.branchUuid(), branch2);
+ branchesByProjectUuid.put(componentDto3.branchUuid(), branch3);
underTest.distributeIssueChangeEvent(issues, projectsByUuid, branchesByProjectUuid);
@@ -203,9 +203,9 @@ public class IssueChangeEventServiceImplTest {
Set<DefaultIssue> issues = Set.of(defaultIssue1);
Map<String, ComponentDto> projectsByUuid = new HashMap<>();
- projectsByUuid.put(project.projectUuid(), project);
+ projectsByUuid.put(project.branchUuid(), project);
Map<String, BranchDto> branchesByProjectUuid = new HashMap<>();
- branchesByProjectUuid.put(project.projectUuid(), branch1);
+ branchesByProjectUuid.put(project.branchUuid(), branch1);
underTest.distributeIssueChangeEvent(issues, projectsByUuid, branchesByProjectUuid);