diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-06-10 18:31:13 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-06-12 11:21:02 +0200 |
commit | 81c539e66ba0b32109ca48fd61ab8dc54d8d95e5 (patch) | |
tree | 4af52da0f4f347b061892782e65eb43686d57fb1 /sonar-core | |
parent | 3cab34083fc3e64a64982acc3ca28141d4da1f18 (diff) | |
download | sonarqube-81c539e66ba0b32109ca48fd61ab8dc54d8d95e5.tar.gz sonarqube-81c539e66ba0b32109ca48fd61ab8dc54d8d95e5.zip |
SONAR-6557 Drop dependencies table
Diffstat (limited to 'sonar-core')
15 files changed, 13 insertions, 298 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/design/FileDependencyDto.java b/sonar-core/src/main/java/org/sonar/core/design/FileDependencyDto.java deleted file mode 100644 index 1c5fa2e3bb0..00000000000 --- a/sonar-core/src/main/java/org/sonar/core/design/FileDependencyDto.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.sonar.core.design; - -public final class FileDependencyDto { - - private Long id; - private String fromComponentUuid; - private String fromParentUuid; - private String toComponentUuid; - private String toParentUuid; - private Long rootProjectSnapshotId; - private Integer weight; - private Long createdAt; - - public Long getId() { - return id; - } - - public FileDependencyDto setId(Long id) { - this.id = id; - return this; - } - - public String getFromComponentUuid() { - return fromComponentUuid; - } - - public FileDependencyDto setFromComponentUuid(String fromComponentUuid) { - this.fromComponentUuid = fromComponentUuid; - return this; - } - - public String getFromParentUuid() { - return fromParentUuid; - } - - public FileDependencyDto setFromParentUuid(String fromParentUuid) { - this.fromParentUuid = fromParentUuid; - return this; - } - - public Long getRootProjectSnapshotId() { - return rootProjectSnapshotId; - } - - public FileDependencyDto setRootProjectSnapshotId(Long rootProjectSnapshotId) { - this.rootProjectSnapshotId = rootProjectSnapshotId; - return this; - } - - public String getToComponentUuid() { - return toComponentUuid; - } - - public FileDependencyDto setToComponentUuid(String toComponentUuid) { - this.toComponentUuid = toComponentUuid; - return this; - } - - public String getToParentUuid() { - return toParentUuid; - } - - public FileDependencyDto setToParentUuid(String toParentUuid) { - this.toParentUuid = toParentUuid; - return this; - } - - public Integer getWeight() { - return weight; - } - - public FileDependencyDto setWeight(Integer weight) { - this.weight = weight; - return this; - } - - public Long getCreatedAt() { - return createdAt; - } - - public FileDependencyDto setCreatedAt(Long createdAt) { - this.createdAt = createdAt; - return this; - } -} diff --git a/sonar-core/src/main/java/org/sonar/core/design/package-info.java b/sonar-core/src/main/java/org/sonar/core/design/package-info.java deleted file mode 100644 index 23d1da72558..00000000000 --- a/sonar-core/src/main/java/org/sonar/core/design/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -@ParametersAreNonnullByDefault -package org.sonar.core.design; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java index f7d7ee524ed..8f2dd4a04aa 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java @@ -34,10 +34,10 @@ import org.sonar.api.server.ServerSide; @ServerSide public class DatabaseVersion { - public static final int LAST_VERSION = 919; + public static final int LAST_VERSION = 922; /** - * List of all the tables.n + * List of all the tables. * This list is hardcoded because we didn't succeed in using java.sql.DatabaseMetaData#getTables() in the same way * for all the supported databases, particularly due to Oracle results. */ @@ -51,7 +51,6 @@ public class DatabaseVersion { "authors", "characteristics", "dashboards", - "dependencies", "duplications_index", "events", "file_sources", diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java index 4c00dfa35f9..7a646a05c29 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java @@ -36,8 +36,8 @@ import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory; import org.apache.ibatis.type.JdbcType; import org.slf4j.LoggerFactory; import org.sonar.api.batch.BatchSide; -import org.sonar.api.server.ServerSide; import org.sonar.api.database.model.MeasureModel; +import org.sonar.api.server.ServerSide; import org.sonar.core.activity.db.ActivityDto; import org.sonar.core.activity.db.ActivityMapper; import org.sonar.core.cluster.WorkQueue; @@ -53,8 +53,6 @@ import org.sonar.core.component.db.SnapshotMapper; import org.sonar.core.computation.db.AnalysisReportDto; import org.sonar.core.computation.db.AnalysisReportMapper; import org.sonar.core.config.Logback; -import org.sonar.core.measure.custom.db.CustomMeasureDto; -import org.sonar.core.measure.custom.db.CustomMeasureMapper; import org.sonar.core.dashboard.ActiveDashboardDto; import org.sonar.core.dashboard.ActiveDashboardMapper; import org.sonar.core.dashboard.DashboardDto; @@ -63,7 +61,6 @@ import org.sonar.core.dashboard.WidgetDto; import org.sonar.core.dashboard.WidgetMapper; import org.sonar.core.dashboard.WidgetPropertyDto; import org.sonar.core.dashboard.WidgetPropertyMapper; -import org.sonar.core.design.FileDependencyMapper; import org.sonar.core.duplication.DuplicationMapper; import org.sonar.core.duplication.DuplicationUnitDto; import org.sonar.core.event.EventDto; @@ -80,6 +77,8 @@ import org.sonar.core.issue.db.IssueFilterFavouriteDto; import org.sonar.core.issue.db.IssueFilterFavouriteMapper; import org.sonar.core.issue.db.IssueFilterMapper; import org.sonar.core.issue.db.IssueMapper; +import org.sonar.core.measure.custom.db.CustomMeasureDto; +import org.sonar.core.measure.custom.db.CustomMeasureMapper; import org.sonar.core.measure.db.MeasureDto; import org.sonar.core.measure.db.MeasureFilterDto; import org.sonar.core.measure.db.MeasureFilterMapper; @@ -249,7 +248,7 @@ public class MyBatis { loadMapper(conf, "org.sonar.core.permission.PermissionMapper"); Class<?>[] mappers = {ActivityMapper.class, ActiveDashboardMapper.class, AuthorMapper.class, DashboardMapper.class, - FileDependencyMapper.class, DuplicationMapper.class, + DuplicationMapper.class, IssueMapper.class, IssueChangeMapper.class, IssueFilterMapper.class, IssueFilterFavouriteMapper.class, IsAliveMapper.class, LoadedTemplateMapper.class, MeasureFilterMapper.class, Migration44Mapper.class, PermissionTemplateMapper.class, PropertiesMapper.class, PurgeMapper.class, diff --git a/sonar-core/src/main/java/org/sonar/core/purge/PurgeCommands.java b/sonar-core/src/main/java/org/sonar/core/purge/PurgeCommands.java index b8c9c49edd5..e34957e39f9 100644 --- a/sonar-core/src/main/java/org/sonar/core/purge/PurgeCommands.java +++ b/sonar-core/src/main/java/org/sonar/core/purge/PurgeCommands.java @@ -21,9 +21,8 @@ package org.sonar.core.purge; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; -import org.apache.ibatis.session.SqlSession; - import java.util.List; +import org.apache.ibatis.session.SqlSession; class PurgeCommands { @@ -156,8 +155,6 @@ class PurgeCommands { List<List<Long>> snapshotIdsPartition = Lists.partition(snapshotIds, MAX_SNAPSHOTS_PER_QUERY); - deleteSnapshotDependencies(snapshotIdsPartition); - deleteSnapshotDuplications(snapshotIdsPartition); profiler.start("deleteSnapshotEvents (events)"); @@ -191,8 +188,6 @@ class PurgeCommands { // note that events are not deleted List<List<Long>> snapshotIdsPartition = Lists.partition(snapshotIds, MAX_SNAPSHOTS_PER_QUERY); - deleteSnapshotDependencies(snapshotIdsPartition); - deleteSnapshotDuplications(snapshotIdsPartition); profiler.start("deleteSnapshotWastedMeasures (project_measures)"); @@ -220,20 +215,6 @@ class PurgeCommands { profiler.stop(); } - private void deleteSnapshotDependencies(final List<List<Long>> snapshotIdsPartition) { - profiler.start("deleteSnapshotDependencies (dependencies)"); - for (List<Long> partSnapshotIds : snapshotIdsPartition) { - // SONAR-4586 - // On MsSQL, the maximum number of parameters allowed in a query is 2000, so we have to execute 3 queries instead of one with 3 or - // inside - purgeMapper.deleteSnapshotDependenciesFromSnapshotId(partSnapshotIds); - purgeMapper.deleteSnapshotDependenciesToSnapshotId(partSnapshotIds); - purgeMapper.deleteSnapshotDependenciesProjectSnapshotId(partSnapshotIds); - } - session.commit(); - profiler.stop(); - } - public void deleteFileSources(String rootUuid) { profiler.start("deleteFileSources (file_sources)"); purgeMapper.deleteFileSourcesByProjectUuid(rootUuid); diff --git a/sonar-core/src/main/java/org/sonar/core/purge/PurgeMapper.java b/sonar-core/src/main/java/org/sonar/core/purge/PurgeMapper.java index 3c5e7131463..5850596aaf7 100644 --- a/sonar-core/src/main/java/org/sonar/core/purge/PurgeMapper.java +++ b/sonar-core/src/main/java/org/sonar/core/purge/PurgeMapper.java @@ -19,11 +19,9 @@ */ package org.sonar.core.purge; -import org.apache.ibatis.annotations.Param; - -import javax.annotation.Nullable; - import java.util.List; +import javax.annotation.Nullable; +import org.apache.ibatis.annotations.Param; public interface PurgeMapper { @@ -37,12 +35,6 @@ public interface PurgeMapper { void deleteSnapshot(@Param("snapshotIds") List<Long> snapshotIds); - void deleteSnapshotDependenciesFromSnapshotId(@Param("snapshotIds") List<Long> snapshotIds); - - void deleteSnapshotDependenciesToSnapshotId(@Param("snapshotIds") List<Long> snapshotIds); - - void deleteSnapshotDependenciesProjectSnapshotId(@Param("snapshotIds") List<Long> snapshotIds); - void deleteSnapshotDuplications(@Param("snapshotIds") List<Long> snapshotIds); void deleteSnapshotEvents(@Param("snapshotIds") List<Long> snapshotIds); diff --git a/sonar-core/src/main/resources/org/sonar/core/design/FileDependencyMapper.xml b/sonar-core/src/main/resources/org/sonar/core/design/FileDependencyMapper.xml deleted file mode 100644 index 2d66c12a62c..00000000000 --- a/sonar-core/src/main/resources/org/sonar/core/design/FileDependencyMapper.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - -<mapper namespace="org.sonar.core.design.FileDependencyMapper"> - - <sql id="fileDependenciesColumns"> - d.id as id, - d.from_component_uuid as fromComponentUuid, - d.to_component_uuid as toComponentUuid, - d.from_parent_uuid as fromParentUuid, - d.to_parent_uuid as toParentUuid, - d.root_project_snapshot_id as rootProjectSnapshotId, - d.dep_weight as "weight", - d.created_at as "createdAt" - </sql> - - <select id="selectFromParents" resultType="org.sonar.core.design.FileDependencyDto" > - SELECT <include refid="fileDependenciesColumns"/> - FROM dependencies d - INNER JOIN snapshots root_snapshot on root_snapshot.id=d.root_project_snapshot_id AND root_snapshot.project_id=#{projectId} AND root_snapshot.islast=${_true} - <where> - AND d.from_parent_uuid=#{fromParentUuid} - AND d.to_parent_uuid=#{toParentUuid} - </where> - </select> - - <select id="selectAll" resultType="org.sonar.core.design.FileDependencyDto" > - SELECT <include refid="fileDependenciesColumns"/> - FROM dependencies d - </select> - - <insert id="insert" parameterType="org.sonar.core.design.FileDependencyDto" useGeneratedKeys="false"> - INSERT INTO dependencies (from_component_uuid, to_component_uuid, from_parent_uuid, to_parent_uuid, root_project_snapshot_id, dep_weight, created_at) - VALUES (#{fromComponentUuid,jdbcType=VARCHAR}, #{toComponentUuid,jdbcType=VARCHAR}, #{fromParentUuid,jdbcType=VARCHAR}, #{toParentUuid,jdbcType=BOOLEAN}, - #{rootProjectSnapshotId,jdbcType=VARCHAR}, #{weight,jdbcType=VARCHAR}, #{createdAt,jdbcType=VARCHAR}) - </insert> - -</mapper> diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql index 724e611a1f3..87fa2131d12 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql @@ -341,6 +341,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('918'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('919'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('920'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('921'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('922'); INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '1418215735482', '1418215735482', null, null); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2; diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl index 3670c426c1f..362aa97b831 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl @@ -3,24 +3,6 @@ CREATE TABLE "GROUPS_USERS" ( "GROUP_ID" INTEGER ); -CREATE TABLE "DEPENDENCIES" ( - "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), - "FROM_SNAPSHOT_ID" INTEGER, - "FROM_COMPONENT_UUID" VARCHAR(50), - "FROM_PARENT_UUID" VARCHAR(50), - "TO_SNAPSHOT_ID" INTEGER, - "TO_COMPONENT_UUID" VARCHAR(50), - "TO_PARENT_UUID" VARCHAR(50), - "DEP_USAGE" VARCHAR(30), - "DEP_WEIGHT" INTEGER, - "PROJECT_SNAPSHOT_ID" INTEGER, - "ROOT_PROJECT_SNAPSHOT_ID" INTEGER, - "PARENT_DEPENDENCY_ID" BIGINT, - "FROM_SCOPE" VARCHAR(3), - "TO_SCOPE" VARCHAR(3), - "CREATED_AT" BIGINT -); - CREATE TABLE "CHARACTERISTICS" ( "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), "KEE" VARCHAR(100), @@ -586,12 +568,6 @@ CREATE INDEX "INDEX_GROUPS_USERS_ON_USER_ID" ON "GROUPS_USERS" ("USER_ID"); CREATE UNIQUE INDEX "GROUPS_USERS_UNIQUE" ON "GROUPS_USERS" ("GROUP_ID", "USER_ID"); -CREATE INDEX "DEPS_TO_SID" ON "DEPENDENCIES" ("TO_SNAPSHOT_ID"); - -CREATE INDEX "DEPS_FROM_SID" ON "DEPENDENCIES" ("FROM_SNAPSHOT_ID"); - -CREATE INDEX "DEPS_PRJ_SID" ON "DEPENDENCIES" ("PROJECT_SNAPSHOT_ID"); - CREATE INDEX "MEASURES_SID_METRIC" ON "PROJECT_MEASURES" ("SNAPSHOT_ID", "METRIC_ID"); CREATE UNIQUE INDEX "METRICS_UNIQUE_NAME" ON "METRICS" ("NAME"); diff --git a/sonar-core/src/main/resources/org/sonar/core/purge/PurgeMapper.xml b/sonar-core/src/main/resources/org/sonar/core/purge/PurgeMapper.xml index 454cebefd32..ae7a29fc062 100644 --- a/sonar-core/src/main/resources/org/sonar/core/purge/PurgeMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/purge/PurgeMapper.xml @@ -103,27 +103,6 @@ </foreach> </delete> - <delete id="deleteSnapshotDependenciesFromSnapshotId" parameterType="map"> - delete from dependencies where from_snapshot_id in - <foreach collection="snapshotIds" open="(" close=")" item="snapshotId" separator=","> - #{snapshotId} - </foreach> - </delete> - - <delete id="deleteSnapshotDependenciesToSnapshotId" parameterType="map"> - delete from dependencies where to_snapshot_id in - <foreach collection="snapshotIds" open="(" close=")" item="snapshotId" separator=","> - #{snapshotId} - </foreach> - </delete> - - <delete id="deleteSnapshotDependenciesProjectSnapshotId" parameterType="map"> - delete from dependencies where project_snapshot_id in - <foreach collection="snapshotIds" open="(" close=")" item="snapshotId" separator=","> - #{snapshotId} - </foreach> - </delete> - <delete id="deleteSnapshotDuplications" parameterType="map"> delete from duplications_index where snapshot_id in <foreach collection="snapshotIds" open="(" close=")" item="snapshotId" separator=","> diff --git a/sonar-core/src/test/java/org/sonar/core/purge/PurgeCommandsTest.java b/sonar-core/src/test/java/org/sonar/core/purge/PurgeCommandsTest.java index 693ea65a447..337df8294cc 100644 --- a/sonar-core/src/test/java/org/sonar/core/purge/PurgeCommandsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/purge/PurgeCommandsTest.java @@ -19,14 +19,13 @@ */ package org.sonar.core.purge; +import java.util.List; import org.apache.ibatis.session.SqlSession; import org.junit.Before; import org.junit.Test; import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.persistence.MyBatis; -import java.util.List; - import static com.google.common.collect.Lists.newArrayList; public class PurgeCommandsTest extends AbstractDaoTestCase { @@ -51,7 +50,7 @@ public class PurgeCommandsTest extends AbstractDaoTestCase { } finally { MyBatis.closeQuietly(session); } - checkTables("shouldDeleteSnapshot", "snapshots", "project_measures", "duplications_index", "events", "dependencies"); + checkTables("shouldDeleteSnapshot", "snapshots", "project_measures", "duplications_index", "events"); } /** @@ -81,8 +80,7 @@ public class PurgeCommandsTest extends AbstractDaoTestCase { } finally { MyBatis.closeQuietly(session); } - checkTables("shouldPurgeSnapshot", - "snapshots", "project_measures", "duplications_index", "events", "dependencies"); + checkTables("shouldPurgeSnapshot", "snapshots", "project_measures", "duplications_index", "events"); } @Test diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml index 7a00cb1ef99..f17226a159a 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml @@ -22,9 +22,6 @@ person_id="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/> - <dependencies id="1" from_component_uuid="A" from_parent_uuid="P_A" from_snapshot_id="1" to_component_uuid="CC" to_parent_uuid="P_CC" to_snapshot_id="30" - parent_dependency_id="[null]" project_snapshot_id="1" root_project_snapshot_id="1" - dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/> <events id="1" name="Version 1.0" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]" event_date="1228222680000" created_at="1228222680000" event_data="[null]"/> <duplications_index id="1" project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml index 16691800d77..3f756fc37d3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml @@ -21,9 +21,6 @@ person_id="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/> - <dependencies id="1" from_component_uuid="A" from_parent_uuid="P_A" from_snapshot_id="1" to_component_uuid="CC" to_parent_uuid="P_CC" to_snapshot_id="30" - parent_dependency_id="[null]" project_snapshot_id="1" root_project_snapshot_id="1" - dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/> <events id="1" name="Version 1.0" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]" event_date="1228222680000" created_at="1228222680000" event_data="[null]"/> <duplications_index id="1" project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0" @@ -51,12 +48,6 @@ person_id="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/> - <dependencies id="2" from_component_uuid="AA" from_parent_uuid="P_AA" from_snapshot_id="10" to_component_uuid="E" to_parent_uuid="P_EE" to_snapshot_id="5" - parent_dependency_id="[null]" project_snapshot_id="5" root_project_snapshot_id="5" - dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/> - <dependencies id="3" from_component_uuid="C" from_parent_uuid="P_C" from_snapshot_id="5" to_component_uuid="CCC" to_parent_uuid="P_CCC" to_snapshot_id="300" - parent_dependency_id="[null]" project_snapshot_id="5" root_project_snapshot_id="5" - dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/> <events id="2" name="Version 1.0" component_uuid="5" snapshot_id="5" category="VERSION" description="[null]" event_date="1228222680000" created_at="1228222680000" event_data="[null]"/> <duplications_index id="2" project_snapshot_id="5" snapshot_id="5" hash="bb" index_in_file="0" start_line="0" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml index e630296526c..370f4d3ab34 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml @@ -33,14 +33,6 @@ Note that measures, events and reviews are not deleted. text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/> - <!--<dependencies id="1" from_component_uuid="A" from_parent_uuid="P_A" from_snapshot_id="1" to_component_uuid="B" to_parent_uuid="P_B" to_snapshot_id="2"--> - <!--parent_dependency_id="[null]" project_snapshot_id="[null]" root_project_snapshot_id="[null]"--> - <!--dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>--> - - <!--<dependencies id="2" from_component_uuid="C" from_parent_uuid="P_C" from_snapshot_id="3" to_component_uuid="A" to_parent_uuid="P_A" to_snapshot_id="1"--> - <!--parent_dependency_id="[null]" project_snapshot_id="2" root_project_snapshot_id="1"--> - <!--dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ" created_at="1228222680000"/>--> - <events id="1" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]" name="Version 1.0" event_date="1228222680000" created_at="1228222680000" @@ -72,14 +64,6 @@ Note that measures, events and reviews are not deleted. text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/> - <dependencies id="3" from_component_uuid="CC" from_parent_uuid="P_CC" from_snapshot_id="33" to_component_uuid="DD" to_parent_uuid="P_DD" to_snapshot_id="44" - parent_dependency_id="[null]" project_snapshot_id="[null]" root_project_snapshot_id="[null]" - dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/> - - <dependencies id="4" from_component_uuid="EE" from_parent_uuid="P_EE" from_snapshot_id="55" to_component_uuid="FF" to_parent_uuid="P_FF" to_snapshot_id="66" - parent_dependency_id="[null]" project_snapshot_id="2" root_project_snapshot_id="1" - dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ" created_at="1228222680000"/> - <events id="2" component_uuid="2" snapshot_id="2" category="VERSION" description="[null]" name="Version 1.0" event_date="1228222680000" created_at="1228222680000" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml index 29bae6354c0..53144869569 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml @@ -18,14 +18,6 @@ tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/> - <dependencies id="1" from_component_uuid="A" from_parent_uuid="P_A" from_snapshot_id="1" to_component_uuid="B" to_parent_uuid="P_B" to_snapshot_id="2" - parent_dependency_id="[null]" project_snapshot_id="[null]" root_project_snapshot_id="[null]" - dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/> - - <dependencies id="2" from_component_uuid="C" from_parent_uuid="P_C" from_snapshot_id="3" to_component_uuid="A" to_parent_uuid="P_A" to_snapshot_id="1" - parent_dependency_id="[null]" project_snapshot_id="2" root_project_snapshot_id="1" - dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ" created_at="1228222680000"/> - <events id="1" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]" name="Version 1.0" event_date="1228222680000" created_at="1228222680000" @@ -56,14 +48,6 @@ text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/> - <dependencies id="3" from_component_uuid="CC" from_parent_uuid="P_CC" from_snapshot_id="33" to_component_uuid="DD" to_parent_uuid="P_DD" to_snapshot_id="44" - parent_dependency_id="[null]" project_snapshot_id="[null]" root_project_snapshot_id="[null]" - dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/> - - <dependencies id="4" from_component_uuid="EE" from_parent_uuid="P_EE" from_snapshot_id="55" to_component_uuid="FF" to_parent_uuid="P_FF" to_snapshot_id="66" - parent_dependency_id="[null]" project_snapshot_id="2" root_project_snapshot_id="1" - dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ" created_at="1228222680000"/> - <events id="2" component_uuid="2" snapshot_id="2" category="VERSION" description="[null]" name="Version 1.0" event_date="1228222680000" created_at="1228222680000" |