From: Alain Kermis Date: Fri, 27 Sep 2024 10:13:01 +0000 (+0200) Subject: SONAR-23207 Fix telemetry metrics for Cpp autoconfig X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1fb4fa71017a200b11e5234db82885eb88b72499;p=sonarqube.git SONAR-23207 Fix telemetry metrics for Cpp autoconfig --- diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java index 6209b00b976..3f4003019cf 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java @@ -488,17 +488,17 @@ class ProjectDaoIT { .collect(Collectors.toSet()); } - private Consumer configureLiveMeasure(String language, MetricDto metric, ProjectDto project, ComponentDto componentDto) { + private Consumer configureLiveMeasure(String language, MetricDto metric, ComponentDto componentDto) { return liveMeasure -> liveMeasure .setMetricUuid(metric.getUuid()) .setComponentUuid(componentDto.uuid()) - .setProjectUuid(project.getUuid()) + .setProjectUuid(componentDto.uuid()) .setData(language + "=" + random.nextInt(10)); } private Consumer insertLiveMeasure(String language, MetricDto metric) { return (projectData) -> db.measures().insertLiveMeasure(projectData.getMainBranchComponent(), metric, - configureLiveMeasure(language, metric, projectData.getProjectDto(), projectData.getMainBranchComponent())); + configureLiveMeasure(language, metric, projectData.getMainBranchComponent())); } private void insertProjectsLiveMeasures(String language, Set projects) { diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml index abfd58f2f88..575a4356117 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml @@ -129,15 +129,15 @@