diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-03-31 02:09:23 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-03-31 16:06:17 +0400 |
commit | c3d2ff43be4cfc704c4b7eb0ffe6d3bf935cfd47 (patch) | |
tree | 66010d65288eba7d4f9cde1799abcc4446b54fd7 /sonar-core | |
parent | 839e764f272932b2a01450d7b3e2a97a4cf06746 (diff) | |
download | sonarqube-c3d2ff43be4cfc704c4b7eb0ffe6d3bf935cfd47.tar.gz sonarqube-c3d2ff43be4cfc704c4b7eb0ffe6d3bf935cfd47.zip |
Fix crlf
Diffstat (limited to 'sonar-core')
42 files changed, 1214 insertions, 1214 deletions
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 index 4fbd9f7d094..c748a030e3a 100644 --- 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 @@ -1,23 +1,23 @@ -<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> + + <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 index ceb6a73c68c..1905e69d94e 100644 --- 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 @@ -1,22 +1,22 @@ -<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> + + <!--<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 index e4e1e9f289d..a31a3a3103f 100644 --- 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 @@ -1,26 +1,26 @@ -<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> + + <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 index ae9389c25b2..a9371f88cc4 100644 --- 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 @@ -1,11 +1,11 @@ -<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> + + <!--<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 index 55b7e7ecc0f..cf0a5f96390 100644 --- 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 @@ -1,11 +1,11 @@ -<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> + + <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 index e5d1c4892a0..f83aff294c3 100644 --- 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 @@ -1,26 +1,26 @@ -<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> + + <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 index 7adc403b439..c449c6eef14 100644 --- 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 @@ -1,12 +1,12 @@ -<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> + + <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 index 705cebd5ef7..baba9aad126 100644 --- 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 @@ -1,11 +1,11 @@ -<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> + + <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 index 645a4f4ca05..ff8b246f66b 100644 --- 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 @@ -1,50 +1,50 @@ -<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> + + <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 index 3f139ece550..096f1983d3b 100644 --- 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 @@ -1,35 +1,35 @@ -<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> + + <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 index b5a5b9dc96d..a268b957d61 100644 --- 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 @@ -1,18 +1,18 @@ -<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> + + <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 index 1a0faac5232..115b532c994 100644 --- 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 @@ -1,24 +1,24 @@ -<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> + + <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 index d898eaa01cc..7a12ccd2074 100644 --- 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 @@ -1,28 +1,28 @@ -<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> + + <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 index 453e0ed20ba..4c2bea917dd 100644 --- 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 @@ -1,24 +1,24 @@ -<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> + + <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 index 64013773824..f10b82f86cd 100644 --- 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 @@ -1,28 +1,28 @@ -<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> + + <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 index c21c79b33cc..bca00e33772 100644 --- 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 @@ -1,24 +1,24 @@ -<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> + + <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 index ed05c5cdfb7..7d20af58577 100644 --- 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 @@ -1,37 +1,37 @@ -<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> + + <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 index f626a2ecdb2..74d8837d110 100644 --- 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 @@ -1,33 +1,33 @@ -<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> + + <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 index 91a93f2d2c0..d881a39193f 100644 --- 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 @@ -1,42 +1,42 @@ -<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> + + <!-- 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 index ff376655173..13c290cb14d 100644 --- 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 @@ -1,36 +1,36 @@ -<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> + + <!-- 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 index 1fd4e3cb408..99475dfb9d1 100644 --- 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 @@ -1,45 +1,45 @@ -<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> + + <!-- 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 index 6fde2608711..7ea8aa5fbaa 100644 --- 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 @@ -1,43 +1,43 @@ -<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> + + <!-- 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 index 6632b151e3f..d2b62cbf6d8 100644 --- 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 @@ -1,59 +1,59 @@ -<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> + + <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 index d3165dc2f7c..9d343211f29 100644 --- 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 @@ -1,49 +1,49 @@ -<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> + + <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 index b63a7063f31..f8df127f391 100644 --- 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 @@ -1,24 +1,24 @@ -<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> + + <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 index 2c6b73de1a7..036b21882df 100644 --- 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 @@ -1,24 +1,24 @@ -<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> + + <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 index 7663f7b1f30..36a166be735 100644 --- 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 @@ -1,44 +1,44 @@ -<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> + + <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 index 177f4a1eed3..5478f7f10bc 100644 --- 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 @@ -1,36 +1,36 @@ -<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> + + <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 index 3283a09d2ef..977d0365d79 100644 --- 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 @@ -1,43 +1,43 @@ -<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> + + <!-- 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 index 634cafee24c..c73190edccd 100644 --- 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 @@ -1,42 +1,42 @@ -<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> + + <!-- 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 index 57705a616ba..04ea0cd38d6 100644 --- 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 @@ -1,47 +1,47 @@ -<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> + + <!-- 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 index 7342409a29c..1916d0b87f4 100644 --- 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 @@ -1,42 +1,42 @@ -<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> + + <!-- 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 index fcd63b79325..bbfd4845003 100644 --- 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 @@ -1,30 +1,30 @@ -<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> + + <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 index 0fe23dabe4b..d0a260f60f1 100644 --- 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 @@ -1,32 +1,32 @@ -<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> + + <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 index 252cfc25be1..ed2be1cb346 100644 --- 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 @@ -1,41 +1,41 @@ -<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> + + <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 index 6e1e6e87b2c..17b279547f2 100644 --- 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 @@ -1,39 +1,39 @@ -<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> + + <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/ProfilesDaoTest/shouldGetProfiles.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/ProfilesDaoTest/shouldGetProfiles.xml index 3325d8baf74..ca00e8cb5c4 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/ProfilesDaoTest/shouldGetProfiles.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/ProfilesDaoTest/shouldGetProfiles.xml @@ -1,7 +1,7 @@ -<dataset>
-
- <rules_profiles id="1" provided="true" name="profile one" default_profile="0" language="java" enabled="true"/>
- <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>
- <rules_profiles id="3" provided="true" name="profile three" default_profile="0" language="plsql" enabled="true"/>
-
+<dataset> + + <rules_profiles id="1" provided="true" name="profile one" default_profile="0" language="java" enabled="true"/> + <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/> + <rules_profiles id="3" provided="true" name="profile three" default_profile="0" language="plsql" enabled="true"/> + </dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml index 94757dbf118..c749a99827e 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml @@ -1,19 +1,19 @@ -<dataset>
-
- <rules_categories id="1" name="category one" description="[null]"/>
-
- <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>
- <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>
-
- <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"
- plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="2" name="bar" description="test" plugin_config_key="checker/bar"
- plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="3" name="baz" description="test" plugin_config_key="checker/baz"
- plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
-
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/>
- <active_rules id="2" profile_id="1" rule_id="2" failure_level="2"/>
- <active_rules id="3" profile_id="1" rule_id="3" failure_level="2"/>
-
+<dataset> + + <rules_categories id="1" name="category one" description="[null]"/> + + <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/> + <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/> + + <rules id="1" name="foo" description="test" plugin_config_key="checker/foo" + plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + <rules id="2" name="bar" description="test" plugin_config_key="checker/bar" + plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + <rules id="3" name="baz" description="test" plugin_config_key="checker/baz" + plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + + <active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/> + <active_rules id="2" profile_id="1" rule_id="2" failure_level="2"/> + <active_rules id="3" profile_id="1" rule_id="3" failure_level="2"/> + </dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml index de59da7e6e7..428fe6d8b44 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml @@ -1,23 +1,23 @@ -<dataset>
-
- <rules_categories id="1" name="category one" description="[null]"/>
-
- <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>
- <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>
-
- <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"
- plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="2" name="bar" description="test" plugin_config_key="checker/bar"
- plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="3" name="baz" description="test" plugin_config_key="checker/baz"
- plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
-
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/>
- <active_rules id="2" profile_id="1" rule_id="2" failure_level="2"/>
- <active_rules id="3" profile_id="1" rule_id="3" failure_level="2"/>
-
- <active_rules id="4" profile_id="2" rule_id="1" failure_level="2"/>
- <active_rules id="5" profile_id="2" rule_id="2" failure_level="2"/>
- <active_rules id="6" profile_id="2" rule_id="3" failure_level="2"/>
-
+<dataset> + + <rules_categories id="1" name="category one" description="[null]"/> + + <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/> + <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/> + + <rules id="1" name="foo" description="test" plugin_config_key="checker/foo" + plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + <rules id="2" name="bar" description="test" plugin_config_key="checker/bar" + plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + <rules id="3" name="baz" description="test" plugin_config_key="checker/baz" + plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + + <active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/> + <active_rules id="2" profile_id="1" rule_id="2" failure_level="2"/> + <active_rules id="3" profile_id="1" rule_id="3" failure_level="2"/> + + <active_rules id="4" profile_id="2" rule_id="1" failure_level="2"/> + <active_rules id="5" profile_id="2" rule_id="2" failure_level="2"/> + <active_rules id="6" profile_id="2" rule_id="3" failure_level="2"/> + </dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml index 94757dbf118..c749a99827e 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml @@ -1,19 +1,19 @@ -<dataset>
-
- <rules_categories id="1" name="category one" description="[null]"/>
-
- <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>
- <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>
-
- <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"
- plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="2" name="bar" description="test" plugin_config_key="checker/bar"
- plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="3" name="baz" description="test" plugin_config_key="checker/baz"
- plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
-
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/>
- <active_rules id="2" profile_id="1" rule_id="2" failure_level="2"/>
- <active_rules id="3" profile_id="1" rule_id="3" failure_level="2"/>
-
+<dataset> + + <rules_categories id="1" name="category one" description="[null]"/> + + <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/> + <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/> + + <rules id="1" name="foo" description="test" plugin_config_key="checker/foo" + plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + <rules id="2" name="bar" description="test" plugin_config_key="checker/bar" + plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + <rules id="3" name="baz" description="test" plugin_config_key="checker/baz" + plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + + <active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/> + <active_rules id="2" profile_id="1" rule_id="2" failure_level="2"/> + <active_rules id="3" profile_id="1" rule_id="3" failure_level="2"/> + </dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml index 7df82f67476..97861d8b3f5 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml @@ -1,19 +1,19 @@ -<dataset>
-
- <rules_categories id="1" name="category one" description="[null]"/>
-
- <!-- Rules -->
- <rules id="1" name="new1" description="test1" plugin_config_key="checker/new1"
- plugin_rule_key="checkstyle.new1" plugin_name="PLUGIN_KEY" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="2" name="new2" description="test2" plugin_config_key="checker/new2"
- plugin_rule_key="checkstyle.new2" plugin_name="PLUGIN_KEY" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
-
- <!-- Rules parameters -->
- <rules_parameters id="1" rule_id="1" name="rule1_param1" description="rule1_desc1" param_type="r"
- />
- <rules_parameters id="2" rule_id="1" name="rule1_param2" description="rule1_desc2" param_type="r"
- />
- <rules_parameters id="3" rule_id="2" name="rule2_param1" description="rule2_desc1" param_type="r"
- />
-
+<dataset> + + <rules_categories id="1" name="category one" description="[null]"/> + + <!-- Rules --> + <rules id="1" name="new1" description="test1" plugin_config_key="checker/new1" + plugin_rule_key="checkstyle.new1" plugin_name="PLUGIN_KEY" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + <rules id="2" name="new2" description="test2" plugin_config_key="checker/new2" + plugin_rule_key="checkstyle.new2" plugin_name="PLUGIN_KEY" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + + <!-- Rules parameters --> + <rules_parameters id="1" rule_id="1" name="rule1_param1" description="rule1_desc1" param_type="r" + /> + <rules_parameters id="2" rule_id="1" name="rule1_param2" description="rule1_desc2" param_type="r" + /> + <rules_parameters id="3" rule_id="2" name="rule2_param1" description="rule2_desc1" param_type="r" + /> + </dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml index 42176327e03..3ecb39c8d8d 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml @@ -1,8 +1,8 @@ -<dataset>
-
- <rules_categories id="1" name="category one" description="[null]"/>
-
- <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"
- plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
-
+<dataset> + + <rules_categories id="1" name="category one" description="[null]"/> + + <rules id="1" name="foo" description="test" plugin_config_key="checker/foo" + plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> + </dataset>
\ No newline at end of file |