Skip to content

Commit 29cbb98

Browse files
committed
chore: Fix manual integration tests
- After pmd/pmd#6280 we don't try to analyze the SQL files under build/resources anymore for the spring framework. This results in less removed errors for test cases 1 and 2. - After pmd/pmd#6166 the patch for test case 4 didn't apply anymore.
1 parent 2f41252 commit 29cbb98

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/manual_integration_tests.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def test_case_1_single_java_rule_changed
6060
# project "apex-link" has 2 errors removed, since we only executed java rules
6161
# project "checkstyle" has 1 errors removed (that's an sql file...) and 1 changed
6262
# project "openjdk-11" has 0 errors removed or changed
63-
# project "spring-framework" has 20 errors removed (these are all sql files...) and 0 changed
63+
# project "spring-framework" has 10 errors removed (these are all sql files...) and 0 changed
6464
# project "java-regression-tests" has 0 errors removed or changed
65-
assert_equal(2 + 2 + 1 + 20, @summary[:errors][:removed], 'found removed errors')
65+
assert_equal(2 + 2 + 1 + 10, @summary[:errors][:removed], 'found removed errors')
6666
# The stack overflow exception might vary in the beginning/end of the stack frames shown
6767
# This stack overflow error is from checkstyle's InputIndentationLongConcatenatedString.java
6868
# instead of assert_equal(0, @summary[:errors][:changed], 'found changed errors')
@@ -76,7 +76,7 @@ def test_case_1_single_java_rule_changed
7676

7777
assert_equal("This changeset changes 0 violations,\n" \
7878
"introduces 0 new violations, 0 new errors and 0 new configuration errors,\n" \
79-
'removes 505 violations, 25 errors and 8 configuration errors.',
79+
'removes 505 violations, 15 errors and 8 configuration errors.',
8080
create_summary_message)
8181

8282
assert_file_equals("#{PATCHES_PATH}/expected_patch_config_1.xml", 'target/reports/diff/patch_config.xml')
@@ -105,9 +105,9 @@ def test_case_2_single_xpath_rule_changed
105105
# project "apex-link" has 2 errors removed, since we only executed java rules
106106
# project "checkstyle" has 1 error removed (that's an sql file...) and 1 error changed
107107
# project "openjdk-11" has 0 errors removed or changed
108-
# project "spring-framework" has 20 errors removed (sql files) and 0 changed
108+
# project "spring-framework" has 10 errors removed (sql files) and 0 changed
109109
# each project has 1 config error removed (LoosePackageCoupling dysfunctional): in total 8 config errors removed
110-
assert_equal(2 + 2 + 1 + 20, @summary[:errors][:removed], 'found removed errors')
110+
assert_equal(2 + 2 + 1 + 10, @summary[:errors][:removed], 'found removed errors')
111111
# The stack overflow exception might vary in the beginning/end of the stack frames shown
112112
# This stack overflow error is from checkstyle's InputIndentationLongConcatenatedString.java
113113
# instead of assert_equal(0, @summary[:errors][:changed], 'found changed errors')
@@ -120,7 +120,7 @@ def test_case_2_single_xpath_rule_changed
120120

121121
assert_equal("This changeset changes 0 violations,\n" \
122122
"introduces 0 new violations, 0 new errors and 0 new configuration errors,\n" \
123-
'removes 22 violations, 25 errors and 8 configuration errors.',
123+
'removes 22 violations, 15 errors and 8 configuration errors.',
124124
create_summary_message)
125125

126126
assert_file_equals("#{PATCHES_PATH}/expected_patch_config_2.xml", 'target/reports/diff/patch_config.xml')

test/resources/manual_integration_tests/patch_test_case_4_modify_docs.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ diff --git a/docs/index.md b/docs/index.md
1414
index 3bafc43f4d..ac7b593dfd 100644
1515
--- a/docs/index.md
1616
+++ b/docs/index.md
17-
@@ -17,7 +17,7 @@ additional_js:
17+
@@ -16,7 +16,7 @@ additional_js:
1818
- js/shuffle.js
1919
---
2020

2121
-
2222
+<!-- some change in docs -->
2323

24-
## 💡 Overview
24+
## 💡 Overview
2525

2626
--
2727
2.45.2

0 commit comments

Comments
 (0)