diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-03-02 13:55:21 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-03-02 13:55:21 +0100 |
commit | 82676715b14d656659e57ceca464f19843b1e689 (patch) | |
tree | fd4989144ff129801b05c2df60064770c8cd0b10 /plugins/sonar-core-plugin/src/test/resources | |
parent | 33b92834463e73d97376c8f159ed357f953d5642 (diff) | |
download | sonarqube-82676715b14d656659e57ceca464f19843b1e689.tar.gz sonarqube-82676715b14d656659e57ceca464f19843b1e689.zip |
Fix performance issues when processing reviews
-> refactor the core decorators that update and close reviews in order to decrease the number of SQL requests
Diffstat (limited to 'plugins/sonar-core-plugin/src/test/resources')
14 files changed, 137 insertions, 557 deletions
diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml deleted file mode 100644 index fd62fa43820..00000000000 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml +++ /dev/null @@ -1,137 +0,0 @@ -<dataset> - - <!-- Component 555 --> - <snapshots - purge_status="[null]" - id="11" - project_id="555" - status="P" islast="false"/> - <snapshots - purge_status="[null]" - id="111" - project_id="555" - status="P" islast="false"/> - <!-- Component 666 --> - <snapshots - purge_status="[null]" - id="22" - project_id="666" - status="P" islast="false"/> - <snapshots - purge_status="[null]" - id="222" - project_id="666" - status="P" islast="false"/> - - <!-- Violations on previous analysis --> - <rule_failures - id="1" - permanent_id="1" - snapshot_id="11" - rule_id="1" failure_level="1"/> - <rule_failures - id="2" - permanent_id="2" - snapshot_id="22" - rule_id="1" failure_level="1"/> - <rule_failures - id="3" - permanent_id="3" - snapshot_id="22" - rule_id="1" failure_level="1"/> - <!-- Violations on new analysis --> - <!-- Violation #1 still exists --> - <rule_failures - id="4" - permanent_id="1" - snapshot_id="111" - rule_id="1" failure_level="1"/> - <!-- Violation #2 has been fixed --> - <!-- Violation #3 still exists --> - <rule_failures - id="5" - permanent_id="3" - snapshot_id="222" - rule_id="1" failure_level="1"/> - - <!-- Existing reviews --> - <!-- - Note that DbUnit uses the first tag for a table to define the columns to be populated. - So that's why "resolution", "created_at", "updated_at", "project_id", "resource_line", "severity" and "user_id" columns here. - --> - <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resolution="[null]" - created_at="[null]" - updated_at="[null]" - project_id="[null]" - resource_line="[null]" - severity="[null]" - user_id="[null]" - resource_id="555" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - - <reviews - id="2" - status="OPEN" - rule_failure_permanent_id="2" - resource_id="666" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="666" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="4" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="5" - status="REOPENED" - rule_failure_permanent_id="3" - resource_id="666" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="6" - status="RESOLVED" - resolution="FIXED" - rule_failure_permanent_id="3" - resource_id="666" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="7" - status="REOPENED" - rule_failure_permanent_id="2" - resource_id="666" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="8" - status="RESOLVED" - resolution="FIXED" - rule_failure_permanent_id="2" - resource_id="666" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - -</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml deleted file mode 100644 index d4c9e11d6ab..00000000000 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml +++ /dev/null @@ -1,98 +0,0 @@ -<dataset> - - <snapshots - purge_status="[null]" - id="11" - project_id="555" - status="P" islast="false"/> - - <!-- Automatic violations --> - <rule_failures - id="1" - permanent_id="1" - snapshot_id="11" - rule_id="1" - failure_level="1" - /> - - - <!-- Manual violations --> - <rule_failures - id="2" - permanent_id="2" - snapshot_id="22" - rule_id="2" - failure_level="4" - /> - - <rule_failures - id="3" - permanent_id="3" - snapshot_id="22" - rule_id="2" - failure_level="4" - /> - - - <!-- - - Reviews on automatic violation - - --> - <reviews - id="1" - status="CLOSED" - rule_failure_permanent_id="1" - resolution="[null]" - created_at="[null]" - updated_at="[null]" - project_id="[null]" - resource_line="[null]" - severity="MINOR" - user_id="[null]" - resource_id="555" - rule_id="1" - manual_violation="false" - manual_severity="false"/> - - <!-- - - Reviews on manual violations - - --> - - <!-- to be closed --> - <reviews - id="2" - status="RESOLVED" - rule_failure_permanent_id="2" - resolution="FIXED" - created_at="[null]" - updated_at="[null]" - project_id="[null]" - resource_line="18" - severity="BLOCKER" - user_id="[null]" - resource_id="555" - rule_id="2" - manual_violation="true" - manual_severity="false"/> - - <!-- to keep opened --> - <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resolution="[null]" - created_at="[null]" - updated_at="[null]" - project_id="[null]" - resource_line="18" - severity="BLOCKER" - user_id="[null]" - resource_id="555" - rule_id="2" - manual_violation="true" - manual_severity="false"/> - -</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewCorrespondingToDeletedResource.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewCorrespondingToDeletedResource.xml deleted file mode 100644 index 847c740236d..00000000000 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewCorrespondingToDeletedResource.xml +++ /dev/null @@ -1,31 +0,0 @@ -<dataset> - - <snapshots - purge_status="[null]" - id="11" - project_id="555" - root_project_id="111" - status="P" islast="true"/> - - <!-- - - Reviews on automatic violation - - --> - <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resolution="[null]" - created_at="[null]" - updated_at="[null]" - project_id="111" - resource_line="[null]" - severity="MINOR" - user_id="[null]" - resource_id="555" - rule_id="1" - manual_violation="false" - manual_severity="false"/> - -</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewWithoutCorrespondingViolation-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewWithoutCorrespondingViolation-result.xml deleted file mode 100644 index d70fd3292dd..00000000000 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewWithoutCorrespondingViolation-result.xml +++ /dev/null @@ -1,76 +0,0 @@ -<dataset> - - <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="555" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="2" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="4" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="5" - status="REOPENED" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="6" - status="RESOLVED" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="7" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="8" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - -</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldReopenResolvedReviewWithNonFixedViolation-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldReopenResolvedReviewWithNonFixedViolation-result.xml deleted file mode 100644 index d36f1d7de19..00000000000 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldReopenResolvedReviewWithNonFixedViolation-result.xml +++ /dev/null @@ -1,76 +0,0 @@ -<dataset> - - <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="555" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="2" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="4" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="5" - status="REOPENED" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="6" - status="REOPENED" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="7" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="8" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - -</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseResolvedManualViolations-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseResolvedManualViolations-result.xml new file mode 100644 index 00000000000..18b0a2dd102 --- /dev/null +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseResolvedManualViolations-result.xml @@ -0,0 +1,17 @@ +<dataset> + + <snapshots id="1" purge_status="[null]" project_id="100" status="P" islast="false"/> + + + <reviews id="1" project_id="[null]" resource_id="100" status="OPEN" rule_failure_permanent_id="1000" + resolution="[null]" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="true" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + <reviews id="2" project_id="[null]" resource_id="100" status="CLOSED" rule_failure_permanent_id="1000" + resolution="FIXED" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="true" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + +</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseResolvedManualViolations.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseResolvedManualViolations.xml new file mode 100644 index 00000000000..728aeae009a --- /dev/null +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseResolvedManualViolations.xml @@ -0,0 +1,17 @@ +<dataset> + + <snapshots id="1" purge_status="[null]" project_id="100" status="P" islast="false"/> + + + <reviews id="1" project_id="[null]" resource_id="100" status="OPEN" rule_failure_permanent_id="1000" + resolution="[null]" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="true" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + <reviews id="2" project_id="[null]" resource_id="100" status="RESOLVED" rule_failure_permanent_id="1000" + resolution="FIXED" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="true" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + +</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnDeletedResources.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnDeletedResources.xml new file mode 100644 index 00000000000..2f1db04a0d2 --- /dev/null +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnDeletedResources.xml @@ -0,0 +1,21 @@ +<dataset> + + <snapshots id="1" purge_status="[null]" project_id="100" status="P" islast="false"/> + + <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.foo.Bar" name="org.foo.Bar" + root_id="[null]" + description="[null]" + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> + + <reviews id="1" project_id="[null]" resource_id="100" status="OPEN" rule_failure_permanent_id="1000" + resolution="[null]" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="true" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + <reviews id="2" project_id="[null]" resource_id="100" status="RESOLVED" rule_failure_permanent_id="1000" + resolution="FIXED" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="true" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + +</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnResolvedViolations-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnResolvedViolations-result.xml new file mode 100644 index 00000000000..44b421f24c6 --- /dev/null +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnResolvedViolations-result.xml @@ -0,0 +1,29 @@ +<dataset> + + <snapshots id="1" purge_status="[null]" project_id="100" status="P" islast="false"/> + + + <!-- open reviews ==> CLOSED --> + <reviews id="1" project_id="[null]" resource_id="100" status="CLOSED" rule_failure_permanent_id="1000" + resolution="[null]" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + <reviews id="2" project_id="[null]" resource_id="100" status="CLOSED" rule_failure_permanent_id="1001" + resolution="FALSE-POSITIVE" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + <!-- closed reviews --> + <reviews id="3" project_id="[null]" resource_id="100" status="CLOSED" rule_failure_permanent_id="1002" + resolution="RESOLVED" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + + <!-- other resource --> + <reviews id="4" project_id="[null]" resource_id="101" status="OPEN" rule_failure_permanent_id="1100" + resolution="[null]" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> +</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnResolvedViolations.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnResolvedViolations.xml new file mode 100644 index 00000000000..a8e0c3949cd --- /dev/null +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldCloseReviewsOnResolvedViolations.xml @@ -0,0 +1,29 @@ +<dataset> + + <snapshots id="1" purge_status="[null]" project_id="100" status="P" islast="false"/> + + + <!-- open reviews --> + <reviews id="1" project_id="[null]" resource_id="100" status="OPEN" rule_failure_permanent_id="1000" + resolution="[null]" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + <reviews id="2" project_id="[null]" resource_id="100" status="RESOLVED" rule_failure_permanent_id="1001" + resolution="FALSE-POSITIVE" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + <!-- closed reviews --> + <reviews id="3" project_id="[null]" resource_id="100" status="CLOSED" rule_failure_permanent_id="1002" + resolution="RESOLVED" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + + <!-- other resource --> + <reviews id="4" project_id="[null]" resource_id="101" status="OPEN" rule_failure_permanent_id="1100" + resolution="[null]" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> +</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldReopenViolations-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldReopenViolations-result.xml new file mode 100644 index 00000000000..68dc04a412b --- /dev/null +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldReopenViolations-result.xml @@ -0,0 +1,12 @@ +<dataset> + + <snapshots id="1" purge_status="[null]" project_id="100" status="P" islast="false"/> + + + <reviews id="1" project_id="[null]" resource_id="100" status="REOPENED" rule_failure_permanent_id="1000" + resolution="[null]" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + +</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldReopenViolations.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldReopenViolations.xml new file mode 100644 index 00000000000..83874328135 --- /dev/null +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ReviewWorkflowDecoratorTest/shouldReopenViolations.xml @@ -0,0 +1,12 @@ +<dataset> + + <snapshots id="1" purge_status="[null]" project_id="100" status="P" islast="false"/> + + + <reviews id="1" project_id="[null]" resource_id="100" status="RESOLVED" rule_failure_permanent_id="1000" + resolution="FIXED" created_at="[null]" updated_at="[null]" + resource_line="[null]" severity="[null]" user_id="[null]" rule_id="[null]" manual_violation="false" manual_severity="false" + title="[null]" assignee_id="[null]"/> + + +</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/fixture.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/fixture.xml deleted file mode 100644 index 7384c0e2e5f..00000000000 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/fixture.xml +++ /dev/null @@ -1,69 +0,0 @@ -<dataset> - <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="1" - title="message OLD" - resource_line="0" - resolution="[null]" - created_at="[null]" - updated_at="[null]" - project_id="[null]" - severity="[null]" - user_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="2" - status="OPEN" - rule_failure_permanent_id="2" - resource_id="1" - title="message 2" - resource_line="2" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="1" - title="message 3" - resource_line="0" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="4" - status="OPEN" - rule_failure_permanent_id="4" - resource_id="1" - title="message OLD" - resource_line="4" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="5" - status="OPEN" - rule_failure_permanent_id="5" - resource_id="1" - title="message 5" - resource_line="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="6" - status="OPEN" - rule_failure_permanent_id="6" - resource_id="1" - title="message OLD" - resource_line="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - -</dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/shouldUpdateReviews-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/shouldUpdateReviews-result.xml deleted file mode 100644 index 55e6c7fc05a..00000000000 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/shouldUpdateReviews-result.xml +++ /dev/null @@ -1,70 +0,0 @@ -<dataset> - - <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="1" - title="message 1" - resource_line="1" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="2" - status="OPEN" - rule_failure_permanent_id="2" - resource_id="1" - title="message 2" - resource_line="2" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="1" - title="message 3" - resource_line="3" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="4" - status="OPEN" - rule_failure_permanent_id="4" - resource_id="1" - title="message 4" - resource_line="4" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="5" - status="OPEN" - rule_failure_permanent_id="5" - resource_id="1" - title="message 5" - resource_line="[null]" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - <reviews - id="6" - status="OPEN" - rule_failure_permanent_id="6" - resource_id="1" - title="message 6" - resource_line="[null]" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false" - manual_severity="false"/> - -</dataset>
\ No newline at end of file |