diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-01-24 14:44:20 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-01-25 11:41:57 +0100 |
commit | d3e0e99e0335a58104f646a572db2b311a321957 (patch) | |
tree | 76f3056def1b4580a6ea545388e4e171a826664e /sonar-db/src/test | |
parent | f3565e3e28683fdeeb1b2abe75cb06286eedb1ae (diff) | |
download | sonarqube-d3e0e99e0335a58104f646a572db2b311a321957.tar.gz sonarqube-d3e0e99e0335a58104f646a572db2b311a321957.zip |
SONAR-8675 drop usage of table resource_index
Diffstat (limited to 'sonar-db/src/test')
26 files changed, 4 insertions, 1361 deletions
diff --git a/sonar-db/src/test/java/org/sonar/db/DaoModuleTest.java b/sonar-db/src/test/java/org/sonar/db/DaoModuleTest.java index c76d29e2dc1..e666e3a2435 100644 --- a/sonar-db/src/test/java/org/sonar/db/DaoModuleTest.java +++ b/sonar-db/src/test/java/org/sonar/db/DaoModuleTest.java @@ -29,6 +29,6 @@ public class DaoModuleTest { public void verify_count_of_added_components() { ComponentContainer container = new ComponentContainer(); new DaoModule().configure(container); - assertThat(container.size()).isEqualTo(2 + 46); + assertThat(container.size()).isEqualTo(2 + 45); } } diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java index e0b62a5dc03..45310b38792 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java @@ -790,7 +790,6 @@ public class ComponentDaoTest { for (int i = 9; i >= 1; i--) { componentDb.insertProjectAndSnapshot(newProjectDto(organizationDto).setName("project-" + i)); } - componentDb.indexAllComponents(); ComponentQuery query = ComponentQuery.builder().setNameOrKeyQuery("oJect").setQualifiers(Qualifiers.PROJECT).build(); List<ComponentDto> result = underTest.selectByQuery(dbSession, query, 1, 3); @@ -805,7 +804,6 @@ public class ComponentDaoTest { @Test public void select_by_query_name_with_special_characters() { componentDb.insertProjectAndSnapshot(newProjectDto(db.getDefaultOrganization()).setName("project-\\_%/-name")); - componentDb.indexAllComponents(); ComponentQuery query = ComponentQuery.builder().setNameOrKeyQuery("-\\_%/-").setQualifiers(Qualifiers.PROJECT).build(); List<ComponentDto> result = underTest.selectByQuery(dbSession, query, 0, 10); @@ -817,7 +815,6 @@ public class ComponentDaoTest { @Test public void select_by_query_key_with_special_characters() { componentDb.insertProjectAndSnapshot(newProjectDto(db.organizations().insert()).setKey("project-_%-key")); - componentDb.indexAllComponents(); ComponentQuery query = ComponentQuery.builder().setNameOrKeyQuery("project-_%-key").setQualifiers(Qualifiers.PROJECT).build(); List<ComponentDto> result = underTest.selectByQuery(dbSession, query, 0, 10); @@ -904,7 +901,6 @@ public class ComponentDaoTest { ComponentDto file3 = newFileDto(module, null, FILE_3_UUID).setKey("file-key-3").setName("File Three"); componentDb.insertComponent(file3); db.commit(); - componentDb.indexAllComponents(); // test children of root ComponentTreeQuery query = newTreeQuery(PROJECT_UUID).build(); @@ -965,7 +961,6 @@ public class ComponentDaoTest { componentDb.insertComponent(newFileDto(project, null, "file-1-uuid")); componentDb.insertComponent(newFileDto(project, null, "file-2-uuid")); db.commit(); - componentDb.indexAllComponents(); ComponentTreeQuery query = newTreeQuery(PROJECT_UUID).setStrategy(LEAVES).build(); @@ -993,7 +988,6 @@ public class ComponentDaoTest { ComponentDto project = newProjectDto(organizationDto, PROJECT_UUID).setName("project name"); componentDb.insertProjectAndSnapshot(project); componentDb.insertComponent(newProjectCopy("project-copy-uuid", project, view)); - componentDb.indexAllComponents(); ComponentTreeQuery dbQuery = newTreeQuery(A_VIEW_UUID).setNameOrKeyQuery("name").setStrategy(CHILDREN).build(); List<ComponentDto> components = underTest.selectDescendants(dbSession, dbQuery); diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDbTester.java b/sonar-db/src/test/java/org/sonar/db/component/ComponentDbTester.java index 605f4820b67..4173b890f2c 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDbTester.java +++ b/sonar-db/src/test/java/org/sonar/db/component/ComponentDbTester.java @@ -19,9 +19,7 @@ */ package org.sonar.db.component; -import java.util.List; import java.util.function.Consumer; -import org.sonar.api.resources.Qualifiers; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; @@ -121,7 +119,8 @@ public class ComponentDbTester { } private static <T> Consumer<T> noExtraConfiguration() { - return (t) -> {}; + return (t) -> { + }; } private ComponentDto insertComponentImpl(ComponentDto component, Consumer<ComponentDto> dtoPopulator) { @@ -137,25 +136,7 @@ public class ComponentDbTester { db.commit(); } - public void indexAllComponents() { - ComponentQuery dbQuery = ComponentQuery.builder() - .setQualifiers(Qualifiers.PROJECT, Qualifiers.VIEW, "DEV") - .build(); - List<ComponentDto> rootProjects = dbClient.componentDao().selectByQuery(dbSession, dbQuery, 0, Integer.MAX_VALUE); - for (ComponentDto project : rootProjects) { - dbClient.componentIndexDao().indexProject(dbSession, project.uuid()); - } - db.commit(); - } - - public void indexComponents(String... componentUuids) { - for (String componentUuid : componentUuids) { - dbClient.componentIndexDao().indexResource(dbSession, componentUuid); - } - db.commit(); - } - - public SnapshotDto insertSnapshot(SnapshotDto snapshotDto){ + public SnapshotDto insertSnapshot(SnapshotDto snapshotDto) { SnapshotDto snapshot = dbClient.snapshotDao().insert(dbSession, snapshotDto); db.commit(); return snapshot; diff --git a/sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java deleted file mode 100644 index 36bce5b6905..00000000000 --- a/sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program 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. - * - * This program 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.db.component; - -import org.junit.Rule; -import org.junit.Test; -import org.sonar.api.resources.Qualifiers; -import org.sonar.api.utils.System2; -import org.sonar.db.DbSession; -import org.sonar.db.DbTester; - -import static org.apache.commons.lang.StringUtils.repeat; -import static org.assertj.core.api.Assertions.assertThat; - -public class ResourceIndexDaoTest { - - private static final String[] EXCLUDED_ID_COLUMN = new String[]{"id"}; - private static final String CPT_UUID = "cpt_uuid"; - private static final String ROOT_UUID = "ABCD"; - - @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE); - - ResourceIndexDao underTest = dbTester.getDbClient().componentIndexDao(); - - @Test - public void shouldIndexResource() { - dbTester.prepareDbUnit(getClass(), "shouldIndexResource.xml"); - - underTest.indexResource(CPT_UUID, "ZipUtils", "FIL", ROOT_UUID); - - dbTester.assertDbUnit(getClass(), "shouldIndexResource-result.xml", EXCLUDED_ID_COLUMN, "resource_index"); - } - - @Test - public void shouldIndexMultiModulesProject() { - dbTester.prepareDbUnit(getClass(), "shouldIndexMultiModulesProject.xml"); - - underTest.indexProject("ABCD"); - - dbTester.assertDbUnit(getClass(), "shouldIndexMultiModulesProject-result.xml", EXCLUDED_ID_COLUMN, "resource_index"); - } - - @Test - public void shouldReindexProjectAfterRenaming() { - dbTester.prepareDbUnit(getClass(), "shouldReindexProjectAfterRenaming.xml"); - - underTest.indexProject("ABCD"); - - dbTester.assertDbUnit(getClass(), "shouldReindexProjectAfterRenaming-result.xml", EXCLUDED_ID_COLUMN, "resource_index"); - } - - @Test - public void shouldNotIndexDirectories() { - dbTester.prepareDbUnit(getClass(), "shouldNotIndexPackages.xml"); - - underTest.indexProject("ABCD"); - // project - assertThat(dbTester.countSql("select count(1) from resource_index where component_uuid='ABCD'")).isGreaterThan(0); - // directory - assertThat(dbTester.countSql("select count(1) from resource_index where component_uuid='BCDE'")).isEqualTo(0); - // file - assertThat(dbTester.countSql("select count(1) from resource_index where component_uuid='CDEF'")).isGreaterThan(0); - } - - @Test - public void shouldIndexTwoLettersLongResources() { - dbTester.prepareDbUnit(getClass(), "shouldIndexTwoLettersLongResource.xml"); - - underTest.indexResource(CPT_UUID, "AB", Qualifiers.PROJECT, ROOT_UUID); - - dbTester.assertDbUnit(getClass(), "shouldIndexTwoLettersLongResource-result.xml", EXCLUDED_ID_COLUMN, "resource_index"); - } - - @Test - public void shouldReIndexTwoLettersLongResources() { - dbTester.prepareDbUnit(getClass(), "shouldReIndexTwoLettersLongResource.xml"); - - underTest.indexResource(ROOT_UUID, "AS", Qualifiers.PROJECT, ROOT_UUID); - - dbTester.assertDbUnit(getClass(), "shouldReIndexTwoLettersLongResource-result.xml", EXCLUDED_ID_COLUMN, "resource_index"); - } - - @Test - public void shouldReIndexNewTwoLettersLongResource() { - dbTester.prepareDbUnit(getClass(), "shouldReIndexNewTwoLettersLongResource.xml"); - - underTest.indexResource(ROOT_UUID, "AS", Qualifiers.PROJECT, ROOT_UUID); - - dbTester.assertDbUnit(getClass(), "shouldReIndexNewTwoLettersLongResource-result.xml", EXCLUDED_ID_COLUMN, "resource_index"); - } - - @Test - public void shouldReindexResource() { - dbTester.prepareDbUnit(getClass(), "shouldReindexResource.xml"); - - underTest.indexResource(ROOT_UUID, "New Struts", Qualifiers.PROJECT, ROOT_UUID); - - dbTester.assertDbUnit(getClass(), "shouldReindexResource-result.xml", EXCLUDED_ID_COLUMN, "resource_index"); - } - - @Test - public void shouldNotReindexUnchangedResource() { - dbTester.prepareDbUnit(getClass(), "shouldNotReindexUnchangedResource.xml"); - - underTest.indexResource(ROOT_UUID, "Struts", Qualifiers.PROJECT, ROOT_UUID); - - dbTester.assertDbUnit(getClass(), "shouldNotReindexUnchangedResource-result.xml", EXCLUDED_ID_COLUMN, "resource_index"); - } - - @Test - public void select_project_ids_from_query_and_view_or_sub_view_uuid() { - dbTester.prepareDbUnit(getClass(), "select_project_ids_from_query_and_view_or_sub_view_uuid.xml"); - - String viewUuid = "EFGH"; - - DbSession session = dbTester.getSession(); - assertThat(underTest.selectProjectIdsFromQueryAndViewOrSubViewUuid(session, "project", viewUuid)).containsOnly(1L, 2L); - assertThat(underTest.selectProjectIdsFromQueryAndViewOrSubViewUuid(session, "one", viewUuid)).containsOnly(1L); - assertThat(underTest.selectProjectIdsFromQueryAndViewOrSubViewUuid(session, "two", viewUuid)).containsOnly(2L); - assertThat(underTest.selectProjectIdsFromQueryAndViewOrSubViewUuid(session, "unknown", viewUuid)).isEmpty(); - } - - /** - * SONAR-7594 - * PROJECTS.NAME is 2'000 characters long whereas RESOURCE_INDEX.KEE is only 400 characters. As there's no functional need - * to increase size of the latter column, indexed values must be truncated. - */ - @Test - public void restrict_indexed_combinations_to_400_characters() { - String longName = repeat("a", 2_000); - ComponentDto project = ComponentTesting.newProjectDto(dbTester.getDefaultOrganization(), ROOT_UUID) - .setProjectUuid(ROOT_UUID) - .setName(longName); - DbSession session = dbTester.getSession(); - dbTester.getDbClient().componentDao().insert(session, project); - dbTester.getDbClient().snapshotDao().insert(session, new SnapshotDto() - .setUuid("u1") - .setComponentUuid(project.uuid()) - .setLast(true)); - - underTest.indexProject(session, project.uuid()); - session.commit(); - - assertThat(dbTester.countRowsOfTable("resource_index")).isEqualTo(longName.length() - ResourceIndexDao.MINIMUM_KEY_SIZE + 1); - } -} diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java b/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java index 0ac06eccd8f..55c3bd734fc 100644 --- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java @@ -372,7 +372,6 @@ public class MeasureDaoTest { ComponentDto file1 = db.components().insertComponent(newFileDto(module1).setUuid("C1").setName("File One")); db.components().insertComponent(newFileDto(module2).setUuid("C2").setName("File Two").setQualifier(UNIT_TEST_FILE)); insertAnalysis(LAST_ANALYSIS_UUID, project.uuid(), true); - db.components().indexAllComponents(); // project insertMeasure("PROJECT_M1", LAST_ANALYSIS_UUID, project.uuid(), NCLOC_METRIC_ID); @@ -423,7 +422,6 @@ public class MeasureDaoTest { db.components().insertComponent(newFileDto(project).setUuid("C2").setName("File Two").setQualifier(UNIT_TEST_FILE)); insertAnalysis(LAST_ANALYSIS_UUID, project.uuid(), true); insertAnalysis(OTHER_ANALYSIS_UUID, project.uuid(), false); - db.components().indexAllComponents(); // project insertMeasure("PROJECT_M1", LAST_ANALYSIS_UUID, project.uuid(), NCLOC_METRIC_ID); @@ -455,7 +453,6 @@ public class MeasureDaoTest { ComponentDto project = db.components().insertProject(); insertAnalysis(LAST_ANALYSIS_UUID, project.uuid(), true); insertAnalysis(OTHER_ANALYSIS_UUID, project.uuid(), false); - db.components().indexAllComponents(); // project insertMeasure("PROJECT_M1", LAST_ANALYSIS_UUID, project.uuid(), NCLOC_METRIC_ID); diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/select_project_ids_from_query_and_view_or_sub_view_uuid.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/select_project_ids_from_query_and_view_or_sub_view_uuid.xml deleted file mode 100644 index 5f6cd291959..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/select_project_ids_from_query_and_view_or_sub_view_uuid.xml +++ /dev/null @@ -1,189 +0,0 @@ -<dataset>IncreasePrecisionOfNumericsTest.update_column_types:48 - - <!-- Real projects --> - <projects organization_uuid="org1" - id="1" - uuid="ABCD" - uuid_path="NOT_USED" - root_uuid="ABCD" - project_uuid="ABCD" - module_uuid_path=".ABCD." - kee="project-one" - copy_component_uuid="[null]" - name="Project One" - qualifier="TRK" - scope="PRJ"/> - <projects organization_uuid="org1" - id="2" - uuid="BCDE" - uuid_path="NOT_USED" - root_uuid="BCDE" - project_uuid="BCDE" - module_uuid_path=".BCDE." - kee="project-two" - copy_component_uuid="[null]" - name="Project Two" - qualifier="TRK" - scope="PRJ"/> - - <!-- Copy projects --> - <projects organization_uuid="org1" - id="3" - uuid="CDEF" - uuid_path="NOT_USED" - root_uuid="EFGH" - project_uuid="EFGH" - module_uuid_path=".EFGH." - kee="copy-project-one" - copy_component_uuid="ABCD" - name="Copy Project One" - qualifier="TRK" - scope="FIL"/> - <projects organization_uuid="org1" - id="4" - uuid="DEFG" - uuid_path="NOT_USED" - root_uuid="EFGH" - project_uuid="EFGH" - module_uuid_path=".EFGH." - kee="copy-project-two" - copy_component_uuid="BCDE" - name="Copy Project One" - qualifier="TRK" - scope="FIL"/> - - <!-- View containing all projects --> - <projects organization_uuid="org1" - id="5" - uuid="EFGH" - uuid_path="NOT_USED" - root_uuid="EFGH" - project_uuid="EFGH" - module_uuid_path=".EFGH." - kee="all-projects" - copy_component_uuid="[null]" - name="All projects" - qualifier="VW" - scope="PRJ"/> - - <resource_index id="1" - kee="project one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="0" - name_size="11" - qualifier="TRK"/> - <resource_index id="2" - kee="roject one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="1" - name_size="11" - qualifier="TRK"/> - <resource_index id="3" - kee="oject one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="2" - name_size="11" - qualifier="TRK"/> - <resource_index id="4" - kee="ject one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="3" - name_size="11" - qualifier="TRK"/> - <resource_index id="5" - kee="ect one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="4" - name_size="11" - qualifier="TRK"/> - <resource_index id="6" - kee="ct one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="5" - name_size="11" - qualifier="TRK"/> - <resource_index id="7" - kee="t one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="6" - name_size="11" - qualifier="TRK"/> - <resource_index id="8" - kee=" one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="7" - name_size="11" - qualifier="TRK"/> - <resource_index id="9" - kee="one" - component_uuid="ABCD" - root_component_uuid="ABCD" - position="8" - name_size="11" - qualifier="TRK"/> - <resource_index id="10" - kee="project two" - component_uuid="BCDE" - root_component_uuid="BCDE" - position="0" - name_size="11" - qualifier="TRK"/> - <resource_index id="11" - kee="roject two" - component_uuid="BCDE" - root_component_uuid="BCDE" - position="1" - name_size="11" - qualifier="TRK"/> - <resource_index id="12" - kee="oject two" - component_uuid="BCDE" - root_component_uuid="BCDE" - position="2" - name_size="11" - qualifier="TRK"/> - <resource_index id="13" - kee="ject two" - component_uuid="BCDE" - root_component_uuid="BCDE" - position="3" - name_size="11" - qualifier="TRK"/> - <resource_index id="14" - kee="ect two" - component_uuid="BCDE" - root_component_uuid="BCDE" - position="4" - name_size="11" - qualifier="TRK"/> - <resource_index id="15" - kee="ct two" - component_uuid="BCDE" - root_component_uuid="BCDE" - position="5" - name_size="11" - qualifier="TRK"/> - <resource_index id="16" - kee="t two" - component_uuid="BCDE" - root_component_uuid="BCDE" - position="6" - name_size="11" - qualifier="TRK"/> - <resource_index id="17" - kee="two" - component_uuid="BCDE" - root_component_uuid="BCDE" - position="7" - name_size="11" - qualifier="TRK"/> - -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexMultiModulesProject-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexMultiModulesProject-result.xml deleted file mode 100644 index 421b7fcadac..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexMultiModulesProject-result.xml +++ /dev/null @@ -1,262 +0,0 @@ -<dataset> - - <!-- project "struts" -> module "struts-core" -> package org.struts -> file "RequestContext" --> - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="Struts" - uuid="ABCD" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_id="[null]" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <projects organization_uuid="org1" - long_name="[null]" - id="2" - scope="PRJ" - qualifier="BRC" - kee="org.struts:struts-core" - name="Struts Core" - uuid="BCDE" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="ABCD" - module_uuid_path=".ABCD." - root_id="1" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <!-- note that the root_id of package/file is wrong. It references the module but not the root project --> - <projects organization_uuid="org1" - long_name="org.struts" - id="3" - scope="DIR" - qualifier="DIR" - kee="org.struts:struts-core:org.struts" - uuid="CDEF" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="BCDE" - module_uuid_path=".ABCD.BCDE" - name="org.struts" - root_id="2" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <projects organization_uuid="org1" - long_name="org.struts.RequestContext" - id="4" - scope="FIL" - qualifier="FIL" - uuid="DEFG" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="BCDE" - module_uuid_path=".ABCD.BCDE" - kee="org.struts:struts-core:org.struts.RequestContext" - name="RequestContext" - root_id="2" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <snapshots purge_status="[null]" - id="1" - uuid="u1" - islast="[true]" - project_id="1"/> - <snapshots purge_status="[null]" - id="2" - uuid="u2" - islast="[true]" - project_id="2"/> - <snapshots purge_status="[null]" - id="3" - uuid="u3" - islast="[true]" - root_component_uuid="ABCD" - project_id="3"/> - <snapshots purge_status="[null]" - id="4" - uuid="u4" - islast="[true]" - root_component_uuid="ABCD" - project_id="4"/> - - <!-- The major goal is to test root_project_id --> - - <!-- RequestContext --> - <resource_index kee="requestcontext" - position="0" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="equestcontext" - position="1" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="questcontext" - position="2" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="uestcontext" - position="3" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="estcontext" - position="4" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="stcontext" - position="5" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="tcontext" - position="6" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="context" - position="7" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="ontext" - position="8" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="ntext" - position="9" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="text" - position="10" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - <resource_index kee="ext" - position="11" - name_size="14" - component_uuid="DEFG" - root_component_uuid="ABCD" - qualifier="FIL"/> - - <!-- Struts --> - <resource_index kee="struts" - position="0" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="truts" - position="1" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="ruts" - position="2" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="uts" - position="3" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - - <!-- Struts Core --> - <resource_index kee="struts core" - position="0" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - <resource_index kee="truts core" - position="1" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - <resource_index kee="ruts core" - position="2" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - <resource_index kee="uts core" - position="3" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - <resource_index kee="ts core" - position="4" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - <resource_index kee="s core" - position="5" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - <resource_index kee=" core" - position="6" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - <resource_index kee="core" - position="7" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - <resource_index kee="ore" - position="8" - name_size="11" - component_uuid="BCDE" - root_component_uuid="ABCD" - qualifier="BRC"/> - - -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexMultiModulesProject.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexMultiModulesProject.xml deleted file mode 100644 index 90fdda5ef4f..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexMultiModulesProject.xml +++ /dev/null @@ -1,93 +0,0 @@ -<dataset> - - <!-- project "struts" -> module "struts-core" -> package org.struts -> file "RequestContext" --> - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="Struts" - uuid="ABCD" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_uuid="ABCD" - description="[null]" - enabled="[true]" - language="java"/> - - <projects organization_uuid="org1" - long_name="[null]" - id="2" - scope="PRJ" - qualifier="BRC" - kee="org.struts:struts-core" - name="Struts Core" - uuid="BCDE" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="ABCD" - module_uuid_path=".ABCD." - root_uuid="ABCD" - description="[null]" - enabled="[true]" - language="java"/> - - <!-- note that the root_id of package/file is wrong. It references the module but not the root project --> - <projects organization_uuid="org1" - long_name="org.struts" - id="3" - scope="DIR" - qualifier="DIR" - kee="org.struts:struts-core:org.struts" - uuid="CDEF" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="BCDE" - module_uuid_path=".ABCD.BCDE" - name="org.struts" - root_uuid="BCDE" - description="[null]" - enabled="[true]" - language="java"/> - - <projects organization_uuid="org1" - long_name="org.struts.RequestContext" - id="4" - scope="FIL" - qualifier="FIL" - uuid="DEFG" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="BCDE" - module_uuid_path=".ABCD.BCDE" - kee="org.struts:struts-core:org.struts.RequestContext" - name="RequestContext" - root_uuid="BCDE" - description="[null]" - enabled="[true]" - language="java"/> - - <snapshots purge_status="[null]" - id="1" - uuid="u1" - islast="[true]" - component_uuid="ABCD"/> - <snapshots purge_status="[null]" - id="2" - uuid="u2" - islast="[true]" - component_uuid="BCDE"/> - <snapshots purge_status="[null]" - id="3" - uuid="u3" - islast="[true]" - component_uuid="CDEF"/> - <snapshots purge_status="[null]" - id="4" - uuid="u4" - islast="[true]" - component_uuid="DEFG"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexProjects-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexProjects-result.xml deleted file mode 100644 index 56045922ff0..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexProjects-result.xml +++ /dev/null @@ -1,169 +0,0 @@ -<dataset> - - <!-- project --> - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="Struts" - uuid="ABCD" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_id="[null]" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <!-- directory --> - <projects organization_uuid="org1" - long_name="org.struts" - id="2" - scope="DIR" - qualifier="PAC" - kee="org.struts:struts:org.struts" - uuid="BCDE" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="ABCD" - module_uuid_path=".ABCD." - name="org.struts" - root_id="1" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <!-- file --> - <projects organization_uuid="org1" - long_name="org.struts.RequestContext" - id="3" - scope="CLA" - qualifier="CLA" - uuid="CDEF" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="ABCD" - module_uuid_path=".ABCD." - kee="org.struts:struts:org.struts.RequestContext" - name="RequestContext" - root_id="1" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <snapshots purge_status="[null]" - id="1" - uuid="u1" - islast="[true]" - - /> - - <!-- RequestContext --> - <resource_index kee="requestcontext" - position="0" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="equestcontext" - position="1" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="questcontext" - position="2" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="uestcontext" - position="3" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="estcontext" - position="4" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="stcontext" - position="5" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="tcontext" - position="6" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="context" - position="7" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="ontext" - position="8" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="ntext" - position="9" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="text" - position="10" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - <resource_index kee="ext" - position="11" - name_size="14" - resource_id="3" - root_project_id="1" - qualifier="CLA"/> - - <!-- Struts --> - <resource_index kee="struts" - position="0" - name_size="6" - resource_id="1" - root_project_id="1" - qualifier="TRK"/> - <resource_index kee="truts" - position="1" - name_size="6" - resource_id="1" - root_project_id="1" - qualifier="TRK"/> - <resource_index kee="ruts" - position="2" - name_size="6" - resource_id="1" - root_project_id="1" - qualifier="TRK"/> - <resource_index kee="uts" - position="3" - name_size="6" - resource_id="1" - root_project_id="1" - qualifier="TRK"/> - -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexProjects.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexProjects.xml deleted file mode 100644 index 51261f6d4b7..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexProjects.xml +++ /dev/null @@ -1,70 +0,0 @@ -<dataset> - - <!-- project --> - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="Struts" - uuid="ABCD" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_id="[null]" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <!-- directory --> - <projects organization_uuid="org1" - long_name="org.struts" - id="2" - scope="DIR" - qualifier="PAC" - kee="org.struts:struts:org.struts" - uuid="BCDE" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="ABCD" - module_uuid_path=".ABCD." - name="org.struts" - root_id="1" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <!-- file --> - <projects organization_uuid="org1" - long_name="org.struts.RequestContext" - id="3" - scope="FIL" - qualifier="CLA" - kee="org.struts:struts:org.struts.RequestContext" - uuid="CDEF" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="ABCD" - module_uuid_path=".ABCD." - name="RequestContext" - root_id="1" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <snapshots purge_status="[null]" - id="1" - islast="[true]" - root_project_id="1" - project_id="1" - scope="PRJ" - qualifier="TRK"/> - -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexResource-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexResource-result.xml deleted file mode 100644 index 6d62588a7ca..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexResource-result.xml +++ /dev/null @@ -1,8 +0,0 @@ -<dataset> - <resource_index kee="ziputils" position="0" name_size="8" component_uuid="cpt_uuid" root_component_uuid="ABCD" qualifier="FIL"/> - <resource_index kee="iputils" position="1" name_size="8" component_uuid="cpt_uuid" root_component_uuid="ABCD" qualifier="FIL"/> - <resource_index kee="putils" position="2" name_size="8" component_uuid="cpt_uuid" root_component_uuid="ABCD" qualifier="FIL"/> - <resource_index kee="utils" position="3" name_size="8" component_uuid="cpt_uuid" root_component_uuid="ABCD" qualifier="FIL"/> - <resource_index kee="tils" position="4" name_size="8" component_uuid="cpt_uuid" root_component_uuid="ABCD" qualifier="FIL"/> - <resource_index kee="ils" position="5" name_size="8" component_uuid="cpt_uuid" root_component_uuid="ABCD" qualifier="FIL"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexResource.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexResource.xml deleted file mode 100644 index 5a4a28b7df3..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexResource.xml +++ /dev/null @@ -1 +0,0 @@ -<dataset></dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexTwoLettersLongResource-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexTwoLettersLongResource-result.xml deleted file mode 100644 index 344265bade2..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexTwoLettersLongResource-result.xml +++ /dev/null @@ -1,3 +0,0 @@ -<dataset> - <resource_index kee="ab" position="0" name_size="2" component_uuid="cpt_uuid" root_component_uuid="ABCD" qualifier="TRK"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexTwoLettersLongResource.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexTwoLettersLongResource.xml deleted file mode 100644 index 5a4a28b7df3..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexTwoLettersLongResource.xml +++ /dev/null @@ -1 +0,0 @@ -<dataset></dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotIndexPackages.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotIndexPackages.xml deleted file mode 100644 index 196a2eccf0d..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotIndexPackages.xml +++ /dev/null @@ -1,75 +0,0 @@ -<dataset> - - <!-- project --> - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="Struts" - uuid="ABCD" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_uuid="ABCD" - description="[null]" - enabled="[true]" - language="java"/> - - <!-- directory --> - <projects organization_uuid="org1" - long_name="org.struts" - id="2" - scope="DIR" - qualifier="DIR" - kee="org.struts:struts:org.struts" - uuid="BCDE" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="ABCD" - module_uuid_path=".ABCD." - name="org.struts" - root_uuid="ABCD" - description="[null]" - enabled="[true]" - language="java"/> - - <!-- file --> - <projects organization_uuid="org1" - long_name="org.struts.RequestContext" - id="3" - scope="FIL" - qualifier="FIL" - kee="org.struts:struts:org.struts.RequestContext" - uuid="CDEF" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="ABCD" - module_uuid_path=".ABCD." - name="RequestContext" - root_uuid="1" - description="[null]" - enabled="[true]" - language="java"/> - - <snapshots purge_status="[null]" - id="1" - uuid="u1" - islast="[true]" - component_uuid="ABCD" - /> - <snapshots purge_status="[null]" - id="2" - uuid="u2" - islast="[true]" - component_uuid="BCDE" - /> - <snapshots purge_status="[null]" - id="3" - islast="[true]" - uuid="u3" - component_uuid="CDEF" - /> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotReindexUnchangedResource-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotReindexUnchangedResource-result.xml deleted file mode 100644 index 1938b8ed281..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotReindexUnchangedResource-result.xml +++ /dev/null @@ -1,6 +0,0 @@ -<dataset> - <resource_index kee="struts" position="0" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="truts" position="1" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="ruts" position="2" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="uts" position="3" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotReindexUnchangedResource.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotReindexUnchangedResource.xml deleted file mode 100644 index 754923bbd26..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotReindexUnchangedResource.xml +++ /dev/null @@ -1,6 +0,0 @@ -<dataset> - <resource_index id="1" kee="struts" position="0" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index id="2" kee="truts" position="1" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index id="3" kee="ruts" position="2" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index id="4" kee="uts" position="3" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexNewTwoLettersLongResource-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexNewTwoLettersLongResource-result.xml deleted file mode 100644 index 60176439bfa..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexNewTwoLettersLongResource-result.xml +++ /dev/null @@ -1,3 +0,0 @@ -<dataset> - <resource_index kee="as" position="0" name_size="2" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexNewTwoLettersLongResource.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexNewTwoLettersLongResource.xml deleted file mode 100644 index 35e67c8e460..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexNewTwoLettersLongResource.xml +++ /dev/null @@ -1,57 +0,0 @@ -<dataset> - - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="AS" - uuid="ABCD" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_uuid="ABCD" - description="[null]" - enabled="[true]" - language="java"/> - - <snapshots purge_status="[null]" - id="1" - uuid="u1" - islast="[true]" - component_uuid="ABCD" - /> - - <!-- the index is on the old name "ST" but not on "AS" --> - <resource_index id="1" - kee="struts" - position="0" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index id="2" - kee="truts" - position="1" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index id="3" - kee="ruts" - position="2" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index id="4" - kee="uts" - position="3" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexTwoLettersLongResource-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexTwoLettersLongResource-result.xml deleted file mode 100644 index 60176439bfa..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexTwoLettersLongResource-result.xml +++ /dev/null @@ -1,3 +0,0 @@ -<dataset> - <resource_index kee="as" position="0" name_size="2" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexTwoLettersLongResource.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexTwoLettersLongResource.xml deleted file mode 100644 index 44f4159a360..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexTwoLettersLongResource.xml +++ /dev/null @@ -1,36 +0,0 @@ -<dataset> - - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="AS" - uuid="ABCD" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_uuid="ABCD" - description="[null]" - enabled="[true]" - language="java"/> - - <snapshots purge_status="[null]" - id="1" - uuid="u1" - islast="[true]" - component_uuid="ABCD" - /> - - <!-- the index is on the old name "ST" but not on "AS" --> - <resource_index id="1" - kee="st" - position="0" - name_size="2" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexProjectAfterRenaming-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexProjectAfterRenaming-result.xml deleted file mode 100644 index 6e10ccc7bff..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexProjectAfterRenaming-result.xml +++ /dev/null @@ -1,95 +0,0 @@ -<dataset> - - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="Apache Struts" - uuid="ABCD" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_id="[null]" - description="[null]" - enabled="[true]" - language="java" - copy_resource_id="[null]" - person_id="[null]"/> - - <snapshots purge_status="[null]" - id="1" - uuid="u1" - islast="[true]" - /> - - <resource_index kee="apache struts" - position="0" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="pache struts" - position="1" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="ache struts" - position="2" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="che struts" - position="3" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="he struts" - position="4" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="e struts" - position="5" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee=" struts" - position="6" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="struts" - position="7" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="truts" - position="8" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="ruts" - position="9" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index kee="uts" - position="10" - name_size="13" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexProjectAfterRenaming.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexProjectAfterRenaming.xml deleted file mode 100644 index d0da7e6c5cb..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexProjectAfterRenaming.xml +++ /dev/null @@ -1,57 +0,0 @@ -<dataset> - - <projects organization_uuid="org1" - long_name="[null]" - id="1" - scope="PRJ" - qualifier="TRK" - kee="org.struts:struts" - name="Apache Struts" - uuid="ABCD" - uuid_path="NOT_USED" - project_uuid="ABCD" - module_uuid="[null]" - module_uuid_path="." - root_uuid="ABCD" - description="[null]" - enabled="[true]" - language="java"/> - - <snapshots purge_status="[null]" - id="1" - uuid="u1" - islast="[true]" - component_uuid="ABCD" - /> - - <!-- the index is on the old name "Struts" but not on "Apache Struts --> - <resource_index id="1" - kee="struts" - position="0" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index id="2" - kee="truts" - position="1" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index id="3" - kee="ruts" - position="2" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - <resource_index id="4" - kee="uts" - position="3" - name_size="6" - component_uuid="ABCD" - root_component_uuid="ABCD" - qualifier="TRK"/> - -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexResource-result.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexResource-result.xml deleted file mode 100644 index a9f3286edf5..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexResource-result.xml +++ /dev/null @@ -1,10 +0,0 @@ -<dataset> - <resource_index kee="new struts" position="0" name_size="10" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="ew struts" position="1" name_size="10" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="w struts" position="2" name_size="10" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee=" struts" position="3" name_size="10" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="struts" position="4" name_size="10" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="truts" position="5" name_size="10" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="ruts" position="6" name_size="10" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index kee="uts" position="7" name_size="10" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexResource.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexResource.xml deleted file mode 100644 index 754923bbd26..00000000000 --- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexResource.xml +++ /dev/null @@ -1,6 +0,0 @@ -<dataset> - <resource_index id="1" kee="struts" position="0" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index id="2" kee="truts" position="1" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index id="3" kee="ruts" position="2" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> - <resource_index id="4" kee="uts" position="3" name_size="6" component_uuid="ABCD" root_component_uuid="ABCD" qualifier="TRK"/> -</dataset> diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml b/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml index ba8204e804f..067b6bc475e 100644 --- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml +++ b/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml @@ -291,19 +291,4 @@ src_hash="123456" data_type="TEST"/> - <resource_index id="1" - kee="project one" - component_uuid="P1" - root_component_uuid="P1" - position="0" - name_size="11" - qualifier="TRK"/> - <resource_index id="2" - kee="roject one" - component_uuid="P1" - root_component_uuid="P1" - position="1" - name_size="11" - qualifier="TRK"/> - </dataset> |