aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-07-12 17:29:09 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-07-12 17:29:27 +0200
commit13963270280fc022c083d54a6e3105c1da0f1c2f (patch)
tree70b8b919cab9e7a9f6e542f82d8e37c75f7db944 /sonar-core
parent3ba418621b203a2cb150f1d3f8c12f0e58cb2566 (diff)
downloadsonarqube-13963270280fc022c083d54a6e3105c1da0f1c2f.tar.gz
sonarqube-13963270280fc022c083d54a6e3105c1da0f1c2f.zip
SONAR-2610 Replace the table ASYNC_MEASURES_SNAPSHOTS by MANUAL_MEASURES
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java196
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java130
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java9
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java2
-rw-r--r--sonar-core/src/main/resources/META-INF/persistence.xml1
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java165
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java153
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java2
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/sharedFixture.xml23
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasure-result.xml22
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasure.xml26
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasureSnapshots-result.xml11
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasureSnapshots.xml11
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetAsyncMeasureSnapshotsFromSnapshotId.xml26
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetLastAsyncMeasureSnapshot.xml12
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextAsyncMeasureSnapshot.xml11
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextAsyncMeasureSnapshotsUntilDate.xml50
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextSnapshotsUntilDate.xml35
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetPreviousAsyncMeasureSnapshots.xml18
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetPreviousSnapshot.xml24
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addFutureSnapshot-result.xml28
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addFutureSnapshot.xml24
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addInvisibleMeasure-result.xml28
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addInvisibleMeasure.xml24
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignAPastMeasureToNextSnapshotsWithDifferentMetric-result.xml37
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignAPastMeasureToNextSnapshotsWithDifferentMetric.xml33
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresToLastSnapshot-result.xml42
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresToLastSnapshot.xml36
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresWhenNoPreviousSnapshot-result.xml45
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresWhenNoPreviousSnapshot.xml43
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasureToFutureSnapshotsWithDifferentMetric-result.xml59
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasureToFutureSnapshotsWithDifferentMetric.xml49
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasuresWhenNoPreviousSnapshot-result.xml24
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasuresWhenNoPreviousSnapshot.xml24
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasureToFutureSnapshots-result.xml44
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasureToFutureSnapshots.xml36
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasuresToLastSnapshot-result.xml43
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasuresToLastSnapshot.xml42
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignPastMeasuresToPastSnapshot-result.xml47
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignPastMeasuresToPastSnapshot.xml42
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteLastMeasure-result.xml30
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteLastMeasure.xml32
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteMeasure-result.xml41
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteMeasure.xml39
-rw-r--r--sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/sharedFixture.xml13
45 files changed, 3 insertions, 1829 deletions
diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java
deleted file mode 100644
index 5f09d281a97..00000000000
--- a/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.database.model.AsyncMeasureSnapshot;
-import org.sonar.api.database.model.MeasureModel;
-import org.sonar.api.database.model.ResourceModel;
-import org.sonar.api.database.model.Snapshot;
-
-import javax.persistence.NoResultException;
-import javax.persistence.Query;
-import java.util.Date;
-import java.util.List;
-
-public class AsyncMeasuresDao extends BaseDao {
-
- public AsyncMeasuresDao(DatabaseSession session) {
- super(session);
- }
-
- public MeasureModel getAsyncMeasure(Long asyncMeasureId) {
- return getSession().getEntityManager().find(MeasureModel.class, asyncMeasureId);
- }
-
- public void deleteAsyncMeasure(MeasureModel asyncMeasure) {
- deleteAsyncMeasureSnapshots(asyncMeasure.getId());
- getSession().remove(asyncMeasure);
- }
-
- public Snapshot getPreviousSnapshot(Snapshot s) {
- try {
- return (Snapshot) getSession().createQuery(
- "SELECT s FROM Snapshot s " +
- "WHERE s.createdAt<:date " +
- "AND s.scope=:scope " +
- "AND s.resourceId=:resourceId " +
- "ORDER BY s.createdAt DESC")
- .setParameter("date", s.getCreatedAt())
- .setParameter("scope", s.getScope())
- .setParameter("resourceId", s.getResourceId())
- .setMaxResults(1)
- .getSingleResult();
- } catch (NoResultException ex) {
- return null;
- }
- }
-
- public List<Snapshot> getNextSnapshotsUntilDate(MeasureModel measure, Date date) {
- Query query = getSession().createQuery(
- "SELECT s FROM Snapshot s " +
- "WHERE s.resourceId=:projectId " +
- "AND s.createdAt>=:beginDate " +
- (date != null ? "AND s.createdAt<:endDate " : "") +
- "AND s.scope=:scope " +
- "ORDER BY s.createdAt ASC ")
- .setParameter("projectId", measure.getProjectId())
- .setParameter("beginDate", measure.getMeasureDate())
- .setParameter("scope", ResourceModel.SCOPE_PROJECT);
- if (date != null) {
- query.setParameter("endDate", date);
- }
- return query.getResultList();
- }
-
- public AsyncMeasureSnapshot createAsyncMeasureSnapshot(Long asyncMeasureId, Integer snapshotId, Date AsyncMeasureDate, Date snapshotDate, Integer metricId, Integer projectId) {
- AsyncMeasureSnapshot asyncMeasureSnapshot = new AsyncMeasureSnapshot(asyncMeasureId, snapshotId, AsyncMeasureDate, snapshotDate, metricId, projectId);
- getSession().save(asyncMeasureSnapshot);
- return asyncMeasureSnapshot;
- }
-
- public void updateAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot, Snapshot snapshot) {
- if (snapshot != null) {
- asyncMeasureSnapshot.setSnapshotId(snapshot.getId());
- asyncMeasureSnapshot.setSnapshotDate(snapshot.getCreatedAt());
- } else {
- asyncMeasureSnapshot.setSnapshotId(null);
- asyncMeasureSnapshot.setSnapshotDate(null);
- }
- getSession().merge(asyncMeasureSnapshot);
- }
-
- public void removeSnapshotFromAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot) {
- asyncMeasureSnapshot.setSnapshotId(null);
- asyncMeasureSnapshot.setSnapshotDate(null);
- getSession().merge(asyncMeasureSnapshot);
- }
-
-
- public AsyncMeasureSnapshot getNextAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) {
- try {
- return (AsyncMeasureSnapshot) getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.projectId=:projectId " +
- "AND ams.metricId=:metricId " +
- "AND ams.measureDate>:date " +
- "ORDER BY ams.measureDate ASC")
- .setParameter("projectId", projetcId)
- .setParameter("metricId", metricId)
- .setParameter("date", date)
- .setMaxResults(1)
- .getSingleResult();
- } catch (NoResultException ex) {
- return null;
- }
- }
-
- public List<AsyncMeasureSnapshot> getNextAsyncMeasureSnapshotsUntilDate(MeasureModel asyncMeasure, Date endDate) {
- Query query = getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.projectId=:projectId " +
- "AND ams.metricId=:metricId " +
- (endDate != null ? "AND ams.measureDate<:endDate " : "") +
- "AND ams.snapshotDate>=:measureDate " +
- "ORDER BY ams.snapshotDate ASC ")
- .setParameter("projectId", asyncMeasure.getProjectId())
- .setParameter("metricId", asyncMeasure.getMetricId())
- .setParameter("measureDate", asyncMeasure.getMeasureDate());
- if (endDate != null) {
- query.setParameter("endDate", endDate);
- }
- return query.getResultList();
- }
-
- public List<AsyncMeasureSnapshot> getPreviousAsyncMeasureSnapshots(Integer projectId, Date beginDate, Date endDate) {
- Query query = getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.projectId=:projectId " +
- "AND ams.measureDate<=:endDate " +
- (beginDate != null ? "AND ams.measureDate>:beginDate " : "") +
- "AND ams.snapshotId IS NULL " +
- "ORDER BY ams.measureDate ASC")
- .setParameter("projectId", projectId)
- .setParameter("endDate", endDate);
- if (beginDate != null) {
- query.setParameter("beginDate", beginDate);
- }
- return query.getResultList();
- }
-
- public List<AsyncMeasureSnapshot> getAsyncMeasureSnapshotsFromSnapshotId(Integer snapshotId, List<Integer> metricIdsToExclude) {
- Query query = getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.snapshotId=:snapshotId " +
- (!metricIdsToExclude.isEmpty() ? "AND ams.metricId NOT IN (:metricIdsToExclude) " : "") +
- "ORDER BY ams.measureDate ASC")
- .setParameter("snapshotId", snapshotId);
- if (!metricIdsToExclude.isEmpty()) {
- query.setParameter("metricIdsToExclude", metricIdsToExclude);
- }
- return query.getResultList();
- }
-
- public AsyncMeasureSnapshot getLastAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) {
- try {
- return (AsyncMeasureSnapshot) getSession().createQuery(
- "SELECT ams FROM AsyncMeasureSnapshot ams " +
- "WHERE ams.projectId=:projectId " +
- "AND ams.metricId=:metricId " +
- "AND ams.measureDate<:date " +
- "ORDER BY ams.measureDate DESC")
- .setParameter("projectId", projetcId)
- .setParameter("metricId", metricId)
- .setParameter("date", date)
- .setMaxResults(1)
- .getSingleResult();
- } catch (NoResultException ex) {
- return null;
- }
- }
-
- public void deleteAsyncMeasureSnapshots(Long asyncMeasureId) {
- getSession().createQuery(
- "DELETE FROM AsyncMeasureSnapshot ams WHERE ams.measureId=:measureId")
- .setParameter("measureId", asyncMeasureId)
- .executeUpdate();
- }
-
-}
diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java b/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java
deleted file mode 100644
index e985ee3c614..00000000000
--- a/sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.database.model.AsyncMeasureSnapshot;
-import org.sonar.api.database.model.MeasureModel;
-import org.sonar.api.database.model.Snapshot;
-
-import java.util.*;
-
-public class AsyncMeasuresService {
- private final DatabaseSession session;
-
- public AsyncMeasuresService(DatabaseSession session) {
- this.session = session;
- }
-
- public void refresh(Snapshot snapshot) {
- AsyncMeasuresDao dao = new AsyncMeasuresDao(session);
- Snapshot previousSnapshot = dao.getPreviousSnapshot(snapshot);
- Date datePreviousSnapshot = (previousSnapshot != null ? previousSnapshot.getCreatedAt() : null);
-
- List<AsyncMeasureSnapshot> previousAsyncMeasureSnapshots = dao.getPreviousAsyncMeasureSnapshots(
- snapshot.getResourceId(), datePreviousSnapshot, snapshot.getCreatedAt());
- if (previousSnapshot != null) {
- previousAsyncMeasureSnapshots.addAll(dao.getAsyncMeasureSnapshotsFromSnapshotId(
- previousSnapshot.getId(), getMetricIds(previousAsyncMeasureSnapshots)));
- }
-
- for (AsyncMeasureSnapshot asyncMeasureSnapshot : purge(previousAsyncMeasureSnapshots)) {
- if (asyncMeasureSnapshot.getSnapshotId() == null) {
- dao.updateAsyncMeasureSnapshot(asyncMeasureSnapshot, snapshot);
- } else {
- dao.createAsyncMeasureSnapshot(
- asyncMeasureSnapshot.getMeasureId(), snapshot.getId(), asyncMeasureSnapshot.getMeasureDate(),
- snapshot.getCreatedAt(), asyncMeasureSnapshot.getMetricId(), asyncMeasureSnapshot.getProjectId());
- }
- }
- session.commit();
- }
-
- public void registerMeasure(Long id) {
- AsyncMeasuresDao dao = new AsyncMeasuresDao(session);
- registerMeasure(dao.getAsyncMeasure(id), dao);
- }
-
- private List<Integer> getMetricIds(List<AsyncMeasureSnapshot> list) {
- List<Integer> ids = new ArrayList<Integer>();
- for (AsyncMeasureSnapshot ams : list) {
- ids.add(ams.getMetricId());
- }
- return ids;
- }
-
- private Collection<AsyncMeasureSnapshot> purge(List<AsyncMeasureSnapshot> list) {
- Map<Integer, AsyncMeasureSnapshot> measuresById = new LinkedHashMap<Integer, AsyncMeasureSnapshot>();
- for (AsyncMeasureSnapshot currentAsyncMeasureSnapshot : list) {
- AsyncMeasureSnapshot asyncMeasureSnapshotFromMap = measuresById.get(currentAsyncMeasureSnapshot.getMetricId());
- if (asyncMeasureSnapshotFromMap != null) {
- if (asyncMeasureSnapshotFromMap.getMeasureDate().before(currentAsyncMeasureSnapshot.getMeasureDate())) {
- measuresById.put(currentAsyncMeasureSnapshot.getMetricId(), currentAsyncMeasureSnapshot);
- }
- } else {
- measuresById.put(currentAsyncMeasureSnapshot.getMetricId(), currentAsyncMeasureSnapshot);
- }
- }
- return measuresById.values();
- }
-
-
- public void deleteMeasure(Long id) {
- AsyncMeasuresDao dao = new AsyncMeasuresDao(session);
- MeasureModel measure = dao.getAsyncMeasure(id);
- AsyncMeasureSnapshot pastAsyncMeasureSnapshot = dao.getLastAsyncMeasureSnapshot(measure.getProjectId(),
- measure.getMetricId(), measure.getMeasureDate());
- dao.deleteAsyncMeasure(measure);
- if (pastAsyncMeasureSnapshot != null) {
- MeasureModel pastAsyncMeasure = dao.getAsyncMeasure(pastAsyncMeasureSnapshot.getMeasureId());
- dao.deleteAsyncMeasureSnapshots(pastAsyncMeasureSnapshot.getMeasureId());
- registerMeasure(pastAsyncMeasure, dao);
- }
- session.commit();
- }
-
- private void registerMeasure(MeasureModel measure, AsyncMeasuresDao dao) {
- AsyncMeasureSnapshot nextAsyncMeasureSnapshot = dao.getNextAsyncMeasureSnapshot(
- measure.getProjectId(), measure.getMetricId(), measure.getMeasureDate());
- Date dateNextAsyncMeasure = (nextAsyncMeasureSnapshot != null) ? nextAsyncMeasureSnapshot.getMeasureDate() : null;
-
- List<AsyncMeasureSnapshot> nextAsyncMeasureSnapshots = dao.getNextAsyncMeasureSnapshotsUntilDate(
- measure, dateNextAsyncMeasure);
- if (!nextAsyncMeasureSnapshots.isEmpty()) {
- for (AsyncMeasureSnapshot asyncMeasureSnapshot : nextAsyncMeasureSnapshots) {
- dao.createAsyncMeasureSnapshot(measure.getId(), asyncMeasureSnapshot.getSnapshotId(), measure.getMeasureDate(),
- asyncMeasureSnapshot.getSnapshotDate(), measure.getMetricId(), measure.getProjectId());
- dao.removeSnapshotFromAsyncMeasureSnapshot(asyncMeasureSnapshot);
- }
- } else {
- List<Snapshot> nextSnapshotsUntilDate = dao.getNextSnapshotsUntilDate(measure, dateNextAsyncMeasure);
- if (!nextSnapshotsUntilDate.isEmpty()) {
- for (Snapshot nextSnapshot : nextSnapshotsUntilDate) {
- dao.createAsyncMeasureSnapshot(measure.getId(), nextSnapshot.getId(), measure.getMeasureDate(),
- nextSnapshot.getCreatedAt(), measure.getMetricId(), measure.getProjectId());
- }
- } else {
- dao.createAsyncMeasureSnapshot(measure.getId(), null, measure.getMeasureDate(),
- null, measure.getMetricId(), measure.getProjectId());
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java b/sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java
index fad86b13ce3..462f8752a81 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java
@@ -23,14 +23,12 @@ public class DaoFacade {
private final RulesDao rulesDao;
private final MeasuresDao measuresDao;
- private final AsyncMeasuresDao asyncMeasureDao;
private final ProfilesDao profilesDao;
- public DaoFacade(ProfilesDao profilesDao, RulesDao rulesDao, MeasuresDao measuresDao, AsyncMeasuresDao asyncMeasureDao) {
+ public DaoFacade(ProfilesDao profilesDao, RulesDao rulesDao, MeasuresDao measuresDao) {
super();
this.rulesDao = rulesDao;
this.measuresDao = measuresDao;
- this.asyncMeasureDao = asyncMeasureDao;
this.profilesDao = profilesDao;
}
@@ -45,9 +43,4 @@ public class DaoFacade {
public MeasuresDao getMeasuresDao() {
return measuresDao;
}
-
- public AsyncMeasuresDao getAsyncMeasureDao() {
- return asyncMeasureDao;
- }
-
}
diff --git a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
index 83e0774bcd7..0a9a08813a0 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
@@ -40,7 +40,7 @@ public class SchemaMigration {
- complete the Derby DDL file used for unit tests : sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl
*/
- public static final int LAST_VERSION = 210;
+ public static final int LAST_VERSION = 213;
public final static String TABLE_NAME = "schema_migrations";
diff --git a/sonar-core/src/main/resources/META-INF/persistence.xml b/sonar-core/src/main/resources/META-INF/persistence.xml
index 276b3f21cd9..a4a8d36b3e4 100644
--- a/sonar-core/src/main/resources/META-INF/persistence.xml
+++ b/sonar-core/src/main/resources/META-INF/persistence.xml
@@ -29,7 +29,6 @@
<class>org.sonar.api.profiles.RulesProfile</class>
<class>org.sonar.api.rules.ActiveRule</class>
<class>org.sonar.api.rules.ActiveRuleParam</class>
- <class>org.sonar.api.database.model.AsyncMeasureSnapshot</class>
<class>org.sonar.api.batch.Event</class>
<class>org.sonar.api.profiles.Alert</class>
<class>org.sonar.api.rules.ActiveRuleChange</class>
diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java
deleted file mode 100644
index ea86260a583..00000000000
--- a/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.junit.Test;
-import org.sonar.api.database.model.AsyncMeasureSnapshot;
-import org.sonar.api.database.model.MeasureModel;
-import org.sonar.api.database.model.ResourceModel;
-import org.sonar.api.database.model.Snapshot;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class AsyncMeasuresDaoTest extends AbstractDbUnitTestCase {
-
- private static final int PROJECT_ID = 1;
- private static final int METRIC_ID = 1;
-
- @Test
- public void testGetNextAsyncMeasureSnapshot() {
- setupData("sharedFixture", "testGetNextAsyncMeasureSnapshot");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- AsyncMeasureSnapshot asyncMeasure = asyncMeasuresDao.getNextAsyncMeasureSnapshot(
- PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 08:00:00.00"));
-
- assertThat(asyncMeasure.getId(), is(3));
- }
-
- @Test
- public void testGetNextSnapshotsUntilDate() {
- setupData("sharedFixture", "testGetNextSnapshotsUntilDate");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l);
- List<Snapshot> snapshotIds = asyncMeasuresDao.getNextSnapshotsUntilDate(
- asyncMeasure, stringToDate("2008-12-06 12:00:00.00"));
-
- assertThat(snapshotIds.size(), is(2));
- assertThat(snapshotIds.get(0).getId(), is(2));
- assertThat(snapshotIds.get(1).getId(), is(4));
- }
-
- @Test
- public void testGetPreviousSnapshot() {
- setupData("sharedFixture", "testGetPreviousSnapshot");
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- Snapshot s = new Snapshot();
- s.setCreatedAt(stringToDate("2008-12-04 08:00:00.00"));
- s.setScope(ResourceModel.SCOPE_PROJECT);
- ResourceModel resource1 = getSession().getEntity(ResourceModel.class, 1);
- ResourceModel resource2 = getSession().getEntity(ResourceModel.class, 2);
-
- s.setResource(resource1);
- assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(1));
-
- s.setResource(resource2);
- assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(5));
- }
-
- @Test
- public void testGetNextAsyncMeasureSnapshotsUntilDate() {
- setupData("sharedFixture", "testGetNextAsyncMeasureSnapshotsUntilDate");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 3l);
- List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getNextAsyncMeasureSnapshotsUntilDate(
- asyncMeasure, stringToDate("2008-12-06 08:00:00.00"));
-
- assertThat(asyncMeasureSnapshots.size(), is(2));
- assertThat(asyncMeasureSnapshots.get(0).getId(), is(2));
- assertThat(asyncMeasureSnapshots.get(1).getId(), is(3));
- }
-
- @Test
- public void testDeleteAsyncMeasure() {
- setupData("sharedFixture", "testDeleteAsyncMeasure");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l);
- asyncMeasuresDao.deleteAsyncMeasure(asyncMeasure);
-
- getSession().commit();
- checkTables("testDeleteAsyncMeasure", "project_measures", "async_measure_snapshots");
- }
-
- @Test
- public void testGetAsyncMeasureSnapshotsFromSnapshotId() {
- setupData("sharedFixture", "testGetAsyncMeasureSnapshotsFromSnapshotId");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- Integer snapshotId = 1;
- List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getAsyncMeasureSnapshotsFromSnapshotId(
- snapshotId, Arrays.asList(1));
- assertThat(asyncMeasureSnapshots.size(), is(1));
- assertThat(asyncMeasureSnapshots.get(0).getId(), is(2));
- }
-
- @Test
- public void testGetLastAsyncMeasureSnapshot() {
- setupData("sharedFixture", "testGetLastAsyncMeasureSnapshot");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- AsyncMeasureSnapshot asyncMeasureSnapshot = asyncMeasuresDao.getLastAsyncMeasureSnapshot(
- PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 12:00:00.00"));
- assertThat(asyncMeasureSnapshot.getId(), is(2));
- }
-
- @Test
- public void testDeleteAsyncMeasureSnapshots() {
- setupData("sharedFixture", "testDeleteAsyncMeasureSnapshots");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- asyncMeasuresDao.deleteAsyncMeasureSnapshots(1l);
-
- checkTables("testDeleteAsyncMeasureSnapshots", "async_measure_snapshots");
- }
-
- @Test
- public void testGetPreviousAsyncMeasureSnapshots() {
- setupData("sharedFixture", "testGetPreviousAsyncMeasureSnapshots");
-
- AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
- List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getPreviousAsyncMeasureSnapshots(
- PROJECT_ID, stringToDate("2008-12-04 08:00:00.00"), stringToDate("2008-12-08 08:00:00.00"));
- assertThat(asyncMeasureSnapshots.size(), is(2));
- assertThat(asyncMeasureSnapshots.get(0).getId(), is(5));
- assertThat(asyncMeasureSnapshots.get(1).getId(), is(6));
- }
-
-
- private static Date stringToDate(String sDate) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS");
- try {
- return sdf.parse(sDate);
- } catch (ParseException e) {
- throw new RuntimeException("Bad date format.");
- }
- }
-
-}
diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java
deleted file mode 100644
index 7b936b5ee9f..00000000000
--- a/sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar 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.
- *
- * Sonar 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 Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.jpa.dao;
-
-import org.junit.Test;
-import org.sonar.api.database.model.Snapshot;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-public class AsyncMeasuresServiceTest extends AbstractDbUnitTestCase {
-
- @Test
- public void assignLatestMeasuresToLastSnapshot() {
- setupData("sharedFixture", "assignLatestMeasuresToLastSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignLatestMeasuresToLastSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignNewMeasuresToLastSnapshot() {
- setupData("sharedFixture", "assignNewMeasuresToLastSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignNewMeasuresToLastSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignMeasuresWhenNoPreviousSnapshot() {
- setupData("sharedFixture", "assignMeasuresWhenNoPreviousSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignLatestMeasuresWhenNoPreviousSnapshot() {
- setupData("sharedFixture", "assignLatestMeasuresWhenNoPreviousSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignLatestMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignPastMeasuresToPastSnapshot() {
- setupData("sharedFixture", "assignPastMeasuresToPastSnapshot");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 3);
- asyncMeasuresService.refresh(snapshot);
-
- checkTables("assignPastMeasuresToPastSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void assignNewMeasureToFutureSnapshots() {
- setupData("sharedFixture", "assignNewMeasureToFutureSnapshots");
-
- AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
- asyncMeasuresService.registerMeasure(2l);
-
- checkTables("assignNewMeasureToFutureSnapshots", "async_measure_snapshots");
- }
-
- @Test
- public void assignMeasureToFutureSnapshotsWithDifferentMetric() {
- setupData("sharedFixture", "assignMeasureToFutureSnapshotsWithDifferentMetric");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.registerMeasure(3l);
-
- checkTables("assignMeasureToFutureSnapshotsWithDifferentMetric", "async_measure_snapshots");
- }
-
- @Test
- public void assignAPastMeasureToNextSnapshotsWithDifferentMetric() {
- setupData("sharedFixture", "assignAPastMeasureToNextSnapshotsWithDifferentMetric");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.registerMeasure(2l);
-
- checkTables("assignAPastMeasureToNextSnapshotsWithDifferentMetric", "async_measure_snapshots");
- }
-
- @Test
- public void addFutureSnapshot() {
- setupData("sharedFixture", "addFutureSnapshot");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.registerMeasure(2l);
-
- checkTables("addFutureSnapshot", "async_measure_snapshots");
- }
-
- @Test
- public void addInvisibleMeasure() {
- setupData("sharedFixture", "addInvisibleMeasure");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.registerMeasure(2l);
-
- checkTables("addInvisibleMeasure", "async_measure_snapshots");
- }
-
- @Test
- public void deleteMeasure() {
- setupData("sharedFixture", "deleteMeasure");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.deleteMeasure(2l);
-
- checkTables("deleteMeasure", "async_measure_snapshots");
- }
-
- @Test
- public void deleteLastMeasure() {
- setupData("sharedFixture", "deleteLastMeasure");
-
- AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
- asyncMeasureService.deleteMeasure(1l);
-
- checkTables("deleteLastMeasure", "async_measure_snapshots");
- }
-
-}
diff --git a/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java b/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
index 834657bb7f9..d8f23f16b50 100644
--- a/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
+++ b/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
@@ -82,7 +82,7 @@ public abstract class AbstractDbUnitTestCase {
public DaoFacade getDao() {
if (dao == null) {
- dao = new DaoFacade(new ProfilesDao(session), new RulesDao(session), new MeasuresDao(session), new AsyncMeasuresDao(session));
+ dao = new DaoFacade(new ProfilesDao(session), new RulesDao(session), new MeasuresDao(session));
}
return dao;
}
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/sharedFixture.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/sharedFixture.xml
deleted file mode 100644
index c748a030e3a..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/sharedFixture.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<dataset>
-
- <metrics id="1" name="foo" val_type="INT" description="[null]" domain="[null]"
- short_name="" qualitative="false" user_managed="false"
- enabled="false" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
- <metrics id="2" name="bar" val_type="INT" description="[null]" domain="[null]"
- short_name="" qualitative="false" user_managed="false"
- enabled="false" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
- <metrics id="3" name="boo" val_type="INT" description="[null]" domain="[null]"
- short_name="" qualitative="false" user_managed="false"
- enabled="false" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="[null]"
- root_id="[null]"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="2" scope="PRJ" qualifier="TRK" kee="mygroup2:myartifact" name="[null]"
- root_id="[null]"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasure-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasure-result.xml
deleted file mode 100644
index 1905e69d94e..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasure-result.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<dataset>
-
- <!--<project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" id="1" project_id="1" metric_id="1" value="1" measure_date="2008-12-03 08:00:00.00" rule_id="[null]"-->
- <!--snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>-->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-06 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- alert_status="[null]" description="[null]"/>
-
-
- <!--<async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>-->
- <!--<async_measure_snapshots id="2" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>-->
- <!--<async_measure_snapshots id="3" project_measure_id="1" snapshot_id="3" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>-->
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="4" measure_date="2008-12-06 08:00:00.00"
- snapshot_date="2008-12-06 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasure.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasure.xml
deleted file mode 100644
index a31a3a3103f..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasure.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<dataset>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-03 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- alert_status="[null]" description="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-06 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- alert_status="[null]" description="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="3" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="4" measure_date="2008-12-06 08:00:00.00"
- snapshot_date="2008-12-06 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasureSnapshots-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasureSnapshots-result.xml
deleted file mode 100644
index a9371f88cc4..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasureSnapshots-result.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<dataset>
-
- <!--<async_measure_snapshots id="1" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="[null]" metric_id="1" project_id="1"/>-->
- <!--<async_measure_snapshots id="2" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="[null]" metric_id="1" project_id="1"/>-->
- <!--<async_measure_snapshots id="3" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="[null]" metric_id="1" project_id="1"/>-->
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="[null]" metric_id="2" project_id="1"/>
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasureSnapshots.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasureSnapshots.xml
deleted file mode 100644
index cf0a5f96390..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testDeleteAsyncMeasureSnapshots.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<dataset>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="[null]" metric_id="2" project_id="1"/>
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetAsyncMeasureSnapshotsFromSnapshotId.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetAsyncMeasureSnapshotsFromSnapshotId.xml
deleted file mode 100644
index f83aff294c3..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetAsyncMeasureSnapshotsFromSnapshotId.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-03 18:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- description="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="2" value="2"
- measure_date="2008-12-04 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- description="[null]"/>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 18:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="1" measure_date="2008-12-04 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetLastAsyncMeasureSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetLastAsyncMeasureSnapshot.xml
deleted file mode 100644
index c449c6eef14..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetLastAsyncMeasureSnapshot.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<dataset>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="1" snapshot_id="2" measure_date="2008-12-04 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="3" measure_date="2008-12-05 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="4" measure_date="2008-12-06 08:00:00.00"
- snapshot_date="2008-12-06 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextAsyncMeasureSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextAsyncMeasureSnapshot.xml
deleted file mode 100644
index baba9aad126..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextAsyncMeasureSnapshot.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<dataset>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="1" snapshot_id="2" measure_date="2008-12-04 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="3" measure_date="2008-12-05 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="4" measure_date="2008-12-06 08:00:00.00"
- snapshot_date="2008-12-06 12:00:00.00" metric_id="1" project_id="1"/>
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextAsyncMeasureSnapshotsUntilDate.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextAsyncMeasureSnapshotsUntilDate.xml
deleted file mode 100644
index ff8b246f66b..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextAsyncMeasureSnapshotsUntilDate.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="4" scope="PRJ" qualifier="TRK" created_at="2008-12-06 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-03 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- description="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-06 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- description="[null]"/>
- <!-- measure inserted on snapshot 2 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-04 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- description="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="3" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="4" measure_date="2008-12-06 08:00:00.00"
- snapshot_date="2008-12-06 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextSnapshotsUntilDate.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextSnapshotsUntilDate.xml
deleted file mode 100644
index 096f1983d3b..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetNextSnapshotsUntilDate.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="FIL" qualifier="CLA" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="3" root_project_id="[null]" root_snapshot_id="3" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="4" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="5" scope="FIL" qualifier="CLA" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="4" root_project_id="[null]" root_snapshot_id="4" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="6" scope="PRJ" qualifier="TRK" created_at="2008-12-06 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-04 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"
- description="[null]"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetPreviousAsyncMeasureSnapshots.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetPreviousAsyncMeasureSnapshots.xml
deleted file mode 100644
index a268b957d61..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetPreviousAsyncMeasureSnapshots.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<dataset>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="2" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="2" measure_date="2008-12-04 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="2" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="3" snapshot_id="3" measure_date="2008-12-05 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="4" snapshot_id="4" measure_date="2008-12-06 08:00:00.00"
- snapshot_date="2008-12-06 12:00:00.00" metric_id="1" project_id="1"/>
-
- <async_measure_snapshots id="5" project_measure_id="5" snapshot_id="[null]" measure_date="2008-12-07 08:00:00.00"
- snapshot_date="[null]" metric_id="2" project_id="1"/>
- <async_measure_snapshots id="6" project_measure_id="6" snapshot_id="[null]" measure_date="2008-12-08 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="7" project_measure_id="7" snapshot_id="[null]" measure_date="2008-12-09 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetPreviousSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetPreviousSnapshot.xml
deleted file mode 100644
index 115b532c994..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresDaoTest/testGetPreviousSnapshot.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="DIR" qualifier="PAC" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="1" root_project_id="[null]" root_snapshot_id="1" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="4" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="5" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="2"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addFutureSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addFutureSnapshot-result.xml
deleted file mode 100644
index 7a12ccd2074..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addFutureSnapshot-result.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to first sanspshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- New measure, after last snapshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-04 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
-
- <!-- No snapshot attached -->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="[null]" measure_date="2008-12-04 12:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addFutureSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addFutureSnapshot.xml
deleted file mode 100644
index 4c2bea917dd..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addFutureSnapshot.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to first sanspshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- New measure, after last snapshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-04 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addInvisibleMeasure-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addInvisibleMeasure-result.xml
deleted file mode 100644
index f10b82f86cd..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addInvisibleMeasure-result.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to first sanspshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- New measure, just before first measure -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="50"
- measure_date="2008-12-02 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
-
- <!-- No snapshot attached -->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="[null]" measure_date="2008-12-02 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addInvisibleMeasure.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addInvisibleMeasure.xml
deleted file mode 100644
index bca00e33772..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/addInvisibleMeasure.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to first sanspshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- New measure, just before first measure -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="50"
- measure_date="2008-12-02 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignAPastMeasureToNextSnapshotsWithDifferentMetric-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignAPastMeasureToNextSnapshotsWithDifferentMetric-result.xml
deleted file mode 100644
index 7d20af58577..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignAPastMeasureToNextSnapshotsWithDifferentMetric-result.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to snapshot 3 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-05 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- Past measure inserted, have to be assigned only to snapshot 1 and 2 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-03 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="3" measure_date="2008-12-05 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="2" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignAPastMeasureToNextSnapshotsWithDifferentMetric.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignAPastMeasureToNextSnapshotsWithDifferentMetric.xml
deleted file mode 100644
index 74d8837d110..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignAPastMeasureToNextSnapshotsWithDifferentMetric.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to snapshot 3 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-05 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- Past measure inserted, have to be assigned only to snapshot 1 and 2 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-03 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="3" measure_date="2008-12-05 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresToLastSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresToLastSnapshot-result.xml
deleted file mode 100644
index d881a39193f..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresToLastSnapshot-result.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<dataset>
-
- <!-- Previous snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <!-- New snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-02 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-02 10:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="2" value="5"
- measure_date="2008-12-03 10:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <!-- Previous async_measure_snapshots, attached to first snapshot -->
- <async_measure_snapshots id="1" project_measure_id="2" snapshot_id="1" measure_date="2008-12-02 10:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="3" snapshot_id="1" measure_date="2008-12-03 10:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="2" project_id="1"/>
-
- <!--async_measure_snapshots from previous snapshot created for last snapshot -->
- <async_measure_snapshots id="3" project_measure_id="2" snapshot_id="2" measure_date="2008-12-02 10:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="3" snapshot_id="2" measure_date="2008-12-03 10:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresToLastSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresToLastSnapshot.xml
deleted file mode 100644
index 13c290cb14d..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresToLastSnapshot.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<dataset>
-
- <!-- Previous snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <!-- New snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-02 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-02 10:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="2" value="5"
- measure_date="2008-12-03 10:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <!-- Previous async_measure_snapshots, attached to first snapshot -->
- <async_measure_snapshots id="1" project_measure_id="2" snapshot_id="1" measure_date="2008-12-02 10:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="3" snapshot_id="1" measure_date="2008-12-03 10:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresWhenNoPreviousSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresWhenNoPreviousSnapshot-result.xml
deleted file mode 100644
index 99475dfb9d1..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresWhenNoPreviousSnapshot-result.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<dataset>
-
- <!-- new snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!--latest-->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-03 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="2" value="6"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!--latest-->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="4" project_id="1" metric_id="2" value="7"
- measure_date="2008-12-03 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <!-- attached -->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="1" measure_date="2008-12-03 12:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="3" snapshot_id="[null]" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="[null]" metric_id="2" project_id="1"/>
- <!-- attached -->
- <async_measure_snapshots id="4" project_measure_id="4" snapshot_id="1" measure_date="2008-12-03 12:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresWhenNoPreviousSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresWhenNoPreviousSnapshot.xml
deleted file mode 100644
index 7ea8aa5fbaa..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignLatestMeasuresWhenNoPreviousSnapshot.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<dataset>
-
- <!-- new snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!--latest-->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-03 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="2" value="6"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!--latest-->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="4" project_id="1" metric_id="2" value="7"
- measure_date="2008-12-03 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="[null]" measure_date="2008-12-03 12:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="3" snapshot_id="[null]" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="[null]" metric_id="2" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="4" snapshot_id="[null]" measure_date="2008-12-03 12:00:00.00"
- snapshot_date="[null]" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasureToFutureSnapshotsWithDifferentMetric-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasureToFutureSnapshotsWithDifferentMetric-result.xml
deleted file mode 100644
index d2b62cbf6d8..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasureToFutureSnapshotsWithDifferentMetric-result.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="4" scope="PRJ" qualifier="TRK" created_at="2008-12-06 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to snapshot 1, 2 and 3 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-03 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- Assigned to snapshot 4 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-06 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- To be assigned only to snapshot 2 and 3 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-04 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <!-- Now assigned to no snapshot -->
- <async_measure_snapshots id="2" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <!-- Now assigned to no snapshot -->
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="4" measure_date="2008-12-06 08:00:00.00"
- snapshot_date="2008-12-06 12:00:00.00" metric_id="1" project_id="1"/>
-
- <!-- Now assigned to review 3 -->
- <async_measure_snapshots id="5" project_measure_id="3" snapshot_id="2" measure_date="2008-12-04 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <!-- Now assigned to review 3 -->
- <async_measure_snapshots id="6" project_measure_id="3" snapshot_id="3" measure_date="2008-12-04 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasureToFutureSnapshotsWithDifferentMetric.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasureToFutureSnapshotsWithDifferentMetric.xml
deleted file mode 100644
index 9d343211f29..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasureToFutureSnapshotsWithDifferentMetric.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="4" scope="PRJ" qualifier="TRK" created_at="2008-12-06 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to snapshot 1, 2 and 3 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-03 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- Assigned to snapshot 4 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-06 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- To be assigned only to snapshot 2 and 3 -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-04 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="3" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="4" measure_date="2008-12-06 08:00:00.00"
- snapshot_date="2008-12-06 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasuresWhenNoPreviousSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasuresWhenNoPreviousSnapshot-result.xml
deleted file mode 100644
index f8df127f391..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasuresWhenNoPreviousSnapshot-result.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-03 14:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="2" value="5"
- measure_date="2008-12-03 15:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 14:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="1" measure_date="2008-12-03 15:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasuresWhenNoPreviousSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasuresWhenNoPreviousSnapshot.xml
deleted file mode 100644
index 036b21882df..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignMeasuresWhenNoPreviousSnapshot.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-03 14:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="2" value="5"
- measure_date="2008-12-03 15:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 14:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="[null]" measure_date="2008-12-03 15:00:00.00"
- snapshot_date="[null]" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasureToFutureSnapshots-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasureToFutureSnapshots-result.xml
deleted file mode 100644
index 36a166be735..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasureToFutureSnapshots-result.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="10"
- measure_date="2008-12-03 8:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- New measure -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-04 8:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 8:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
-
- <!-- Now assigned to no snapshot -->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="[null]" measure_date="2008-12-03 8:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="3" snapshot_id="[null]" measure_date="2008-12-03 8:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
-
- <!-- Now assigned to snapshot 2 and 3 -->
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="2" measure_date="2008-12-04 8:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="5" project_measure_id="2" snapshot_id="3" measure_date="2008-12-04 8:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasureToFutureSnapshots.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasureToFutureSnapshots.xml
deleted file mode 100644
index 5478f7f10bc..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasureToFutureSnapshots.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="10"
- measure_date="2008-12-03 8:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- New measure -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-04 8:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 8:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="2" measure_date="2008-12-03 8:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="3" snapshot_id="3" measure_date="2008-12-03 8:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasuresToLastSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasuresToLastSnapshot-result.xml
deleted file mode 100644
index 977d0365d79..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasuresToLastSnapshot-result.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<dataset>
-
- <!-- Previous snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <!-- New snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- Assigned to first sanspshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <!-- Assigmed to no snapshot, because its new reviews -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-03 18:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="2" value="5"
- measure_date="2008-12-04 10:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <!-- async_measure_snapshots attached to first snapshot -->
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
-
- <!-- async_measure_snapshots now attached to last snapshot -->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="2" measure_date="2008-12-03 18:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="3" snapshot_id="2" measure_date="2008-12-04 10:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasuresToLastSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasuresToLastSnapshot.xml
deleted file mode 100644
index c73190edccd..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignNewMeasuresToLastSnapshot.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<dataset>
-
- <!-- Previous snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <!-- New snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"/>
-
- <!-- Assigned to first sanspshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-02 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <!-- Assigmed to no snapshot, because its new reviews -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-03 18:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="3" project_id="1" metric_id="2" value="5"
- measure_date="2008-12-04 10:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <!-- async_measure_snapshots attached to first snapshot -->
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-02 12:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
-
- <!-- async_measure_snapshots attached to no snapshot -->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="[null]" measure_date="2008-12-03 18:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="3" snapshot_id="[null]" measure_date="2008-12-04 10:00:00.00"
- snapshot_date="[null]" metric_id="2" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignPastMeasuresToPastSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignPastMeasuresToPastSnapshot-result.xml
deleted file mode 100644
index 04ea0cd38d6..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignPastMeasuresToPastSnapshot-result.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<dataset>
-
- <!-- First snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <!-- Last snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- New snapshot, inserted between last two -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
-
- <!-- reviews attached to first snapshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-01 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- reviews attached to last snapshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-04 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <!-- async_measure_snapshots attached to first snapshot -->
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-01 12:00:00.00"
- snapshot_date="2008-12-02 12:00:00.00" metric_id="1" project_id="1"/>
- <!-- async_measure_snapshots attached to last snapshot -->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="2" measure_date="2008-12-04 12:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-
- <!-- async_measure_snapshots created for the new snapshot -->
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="3" measure_date="2008-12-01 12:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignPastMeasuresToPastSnapshot.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignPastMeasuresToPastSnapshot.xml
deleted file mode 100644
index 1916d0b87f4..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/assignPastMeasuresToPastSnapshot.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<dataset>
-
- <!-- First snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <!-- Last snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!-- New snapshot, inserted between last two -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
-
- <!-- reviews attached to first snapshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-01 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- reviews attached to last snapshot -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="5"
- measure_date="2008-12-04 12:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <!-- async_measure_snapshots attached to first snapshot -->
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="1" measure_date="2008-12-01 12:00:00.00"
- snapshot_date="2008-12-02 12:00:00.00" metric_id="1" project_id="1"/>
- <!-- async_measure_snapshots attached to last snapshot -->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="2" measure_date="2008-12-04 12:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteLastMeasure-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteLastMeasure-result.xml
deleted file mode 100644
index bbfd4845003..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteLastMeasure-result.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <!--<project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" id="1" project_id="1" metric_id="1" value="12" measure_date="2008-12-03 10:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>-->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-04 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
-
- <!--<async_measure_snapshots id="1" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 10:00:00.00"-->
- <!--snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>-->
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="3" measure_date="2008-12-04 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteLastMeasure.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteLastMeasure.xml
deleted file mode 100644
index d0a260f60f1..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteLastMeasure.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="12"
- measure_date="2008-12-03 10:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="8"
- measure_date="2008-12-04 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 10:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="2" project_measure_id="2" snapshot_id="3" measure_date="2008-12-04 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteMeasure-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteMeasure-result.xml
deleted file mode 100644
index ed2be1cb346..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteMeasure-result.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-03 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- async measure to be deleted -->
- <!--<project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" id="2" project_id="1" metric_id="1" value="2" measure_date="2008-12-05 08:00:00.00" rule_id="[null]"-->
- <!--snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>-->
-
- <!-- old async measure snapshots -->
- <!--<async_measure_snapshots id="1" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="[null]" metric_id="1" project_id="1" />-->
-
- <!--<async_measure_snapshots id="2" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1" />-->
- <!--<async_measure_snapshots id="3" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"-->
- <!--snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1" />-->
- <!--<async_measure_snapshots id="4" project_measure_id="2" snapshot_id="3" measure_date="2008-12-05 08:00:00.00"-->
- <!--snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1" />-->
-
- <async_measure_snapshots id="5" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="6" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="7" project_measure_id="1" snapshot_id="3" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteMeasure.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteMeasure.xml
deleted file mode 100644
index 17b279547f2..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/deleteMeasure.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<dataset>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-03 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="2" scope="PRJ" qualifier="TRK" created_at="2008-12-04 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="3" scope="PRJ" qualifier="TRK" created_at="2008-12-05 12:00:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true"
- path="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" project_id="1" metric_id="1" value="1"
- measure_date="2008-12-03 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
- <!-- async measure to be deleted -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" project_id="1" metric_id="1" value="2"
- measure_date="2008-12-05 08:00:00.00" rule_id="[null]"
- snapshot_id="[null]" rules_category_id="[null]" text_value="[null]" tendency="[null]"/>
-
- <!-- old async measure snapshots -->
- <async_measure_snapshots id="1" project_measure_id="1" snapshot_id="[null]" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="[null]" metric_id="1" project_id="1"/>
-
- <async_measure_snapshots id="2" project_measure_id="1" snapshot_id="1" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-03 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="3" project_measure_id="1" snapshot_id="2" measure_date="2008-12-03 08:00:00.00"
- snapshot_date="2008-12-04 12:00:00.00" metric_id="1" project_id="1"/>
- <async_measure_snapshots id="4" project_measure_id="2" snapshot_id="3" measure_date="2008-12-05 08:00:00.00"
- snapshot_date="2008-12-05 12:00:00.00" metric_id="1" project_id="1"/>
-
-</dataset> \ No newline at end of file
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/sharedFixture.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/sharedFixture.xml
deleted file mode 100644
index d1a6b09be2f..00000000000
--- a/sonar-core/src/test/resources/org/sonar/jpa/dao/AsyncMeasuresServiceTest/sharedFixture.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<dataset>
-
- <metrics id="1" name="foo" val_type="INT" description="[null]" domain="[null]"
- short_name="" qualitative="false" user_managed="false" enabled="false" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
- <metrics id="2" name="bar" val_type="INT" description="[null]" domain="[null]"
- short_name="" qualitative="false" user_managed="false" enabled="false" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="[null]"
- root_id="[null]"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
-</dataset> \ No newline at end of file