You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2023/07/10 11:22:56 UTC

[GitHub] [maven-javadoc-plugin] elharo opened a new pull request, #219: [MJAVADOC-763] remove test that doesn't test what it claims

elharo opened a new pull request, #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219

   And clean up other tests to prevent accidental pass or fail


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-javadoc-plugin] slachiewicz commented on a diff in pull request #219: [MJAVADOC-763] remove test that doesn't test what it claims

Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on code in PR #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1293952178


##########
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##########
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
         }
     }
 
-    /**
-     * @throws Exception if any
-     */
-    public void testExceptions() throws Exception {
-        try {
-            Path testPom = unit.resolve("default-configuration/exception-test-plugin-config.xml");
-            JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   ExceptionTestMavenProjectStub project class is missing. agree was bad from start



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MJAVADOC-763] remove test that doesn't test what it claims [maven-javadoc-plugin]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on PR #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219#issuecomment-2957401788

   Resolve #1135


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-javadoc-plugin] elharo commented on a diff in pull request #219: [MJAVADOC-763] remove test that doesn't test what it claims

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1263627189


##########
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##########
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
         }
     }
 
-    /**
-     * @throws Exception if any
-     */
-    public void testExceptions() throws Exception {
-        try {
-            Path testPom = unit.resolve("default-configuration/exception-test-plugin-config.xml");
-            JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   This lookup fails and throws an exception, causing the test to pass. It never executes the mojo which is what it's supposed to test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-javadoc-plugin] elharo commented on a diff in pull request #219: [MJAVADOC-763] remove test that doesn't test what it claims

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1293875949


##########
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##########
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
         }
     }
 
-    /**
-     * @throws Exception if any
-     */
-    public void testExceptions() throws Exception {
-        try {
-            Path testPom = unit.resolve("default-configuration/exception-test-plugin-config.xml");
-            JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   No, the execute method is never invoked. The lookupMojo method fails because the mojo was poorly written. It's been months since I wrote this, so I'm not sure if the test case was always broken or the code itself, but this is trying to test line 604 but instead the exception is thrown before we get there. The test fails if you catch MojoExecutionException instead of Exception. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-javadoc-plugin] elharo merged pull request #219: [MJAVADOC-763] remove test that doesn't test what it claims

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo merged PR #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-javadoc-plugin] slachiewicz commented on a diff in pull request #219: [MJAVADOC-763] remove test that doesn't test what it claims

Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on code in PR #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1293185054


##########
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##########
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
         }
     }
 
-    /**
-     * @throws Exception if any
-     */
-    public void testExceptions() throws Exception {
-        try {
-            Path testPom = unit.resolve("default-configuration/exception-test-plugin-config.xml");
-            JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   Maybe we should catch MojoExecutionException and check the root cous of the failing test instead of the generic Exception?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-javadoc-plugin] michael-o commented on pull request #219: [MJAVADOC-763] remove test that doesn't test what it claims

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #219:
URL: https://github.com/apache/maven-javadoc-plugin/pull/219#issuecomment-1635681681

   I don't have an opinion here


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org