You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ad...@apache.org on 2023/01/17 18:33:24 UTC

[maven-pmd-plugin] 08/08: Fix integration tests

This is an automated email from the ASF dual-hosted git repository.

adangel pushed a commit to branch pmd7
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git

commit 6eb188612db2ab7303ce13826116e3f1332e1695
Author: Andreas Dangel <ad...@apache.org>
AuthorDate: Tue Jan 17 19:26:54 2023 +0100

    Fix integration tests
---
 src/it/MPMD-219-pmd-processing-error/verify.groovy | 3 ++-
 src/it/MPMD-244-logging/verify.groovy              | 6 +++---
 src/it/MPMD-268-deprecated-rules/verify.groovy     | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/it/MPMD-219-pmd-processing-error/verify.groovy b/src/it/MPMD-219-pmd-processing-error/verify.groovy
index 9cf76cc..b9212f2 100644
--- a/src/it/MPMD-219-pmd-processing-error/verify.groovy
+++ b/src/it/MPMD-219-pmd-processing-error/verify.groovy
@@ -20,4 +20,5 @@
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
 assert buildLog.text.contains( "PMD processing errors" )
-assert buildLog.text.contains( "BrokenFile.java: ParseException: Encountered" )
+assert buildLog.text.contains( "BrokenFile.java: ParseException: Parse exception in file")
+assert buildLog.text.contains( "Encountered" )
diff --git a/src/it/MPMD-244-logging/verify.groovy b/src/it/MPMD-244-logging/verify.groovy
index daa1091..b3d0d7e 100644
--- a/src/it/MPMD-244-logging/verify.groovy
+++ b/src/it/MPMD-244-logging/verify.groovy
@@ -26,13 +26,13 @@ String disabledPath = new File( basedir, 'logging-disabled/src/main/java/BrokenF
 String enabledPath = new File( basedir, 'logging-enabled/src/main/java/BrokenFile.java' ).getCanonicalPath()
 
 // logging disabled: the pmd exception is only output through the processing error reporting (since MPMD-246)
-assert 1 == buildLog.text.count( "${disabledPath}: ParseException: Encountered" )
+assert 1 == buildLog.text.count( "${disabledPath}: ParseException: Parse exception in file" )
 
 // TODO: with PMD 7, the parse exception is not logged through PMD's logging anymore, it is only added as a processing error
 // in the report. is this correct?
 // logging enabled: the pmd exception is output twice: through the processing error reporting (since MPMD-246) and through PMD's own logging
-// assert 2 == buildLog.text.count( "${enabledPath}: ParseException: Encountered" )
-assert 1 == buildLog.text.count( "${enabledPath}: ParseException: Encountered" )
+// assert 2 == buildLog.text.count( "${enabledPath}: ParseException: Parse exception in file" )
+assert 1 == buildLog.text.count( "${enabledPath}: ParseException: Parse exception in file" )
 
 // logging disabled module is executed first, which disables the logging
 // even when logging-enabled is executed afterwards in the same JVM, the logger are not reinitialized
diff --git a/src/it/MPMD-268-deprecated-rules/verify.groovy b/src/it/MPMD-268-deprecated-rules/verify.groovy
index 009a5dd..5c41672 100644
--- a/src/it/MPMD-268-deprecated-rules/verify.groovy
+++ b/src/it/MPMD-268-deprecated-rules/verify.groovy
@@ -19,4 +19,4 @@
 
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
-assert buildLog.text.contains( "[WARNING] Use Rule name category/java/codestyle.xml/ControlStatementBraces instead of the deprecated" )
+assert buildLog.text.contains( "Use Rule name category/java/codestyle.xml/ControlStatementBraces instead of the deprecated" )