andymc12 opened a new pull request #810:
URL: https://github.com/apache/cxf/pull/810


   From https://github.com/apache/cxf/pull/805#issuecomment-853608507 :
   > @andymc12 I spoke of surefire excludes cause it harnesses "in force mode" 
the exclusion. Your test without mp-config uses mp-config due to the 
grand-parent pom which imports geronimo-config-impl. The "check it is not 
there" pattern is wrongly written:
   >
   >    try {
   >        Class.forName("org.eclipse.microprofile.config.ConfigProvider");
   >        fail("ConfigProvider API class is on the classpath - results from 
this test project are not valid");
   >    } catch (Throwable t) {
   >        // expected
   >    }
   >If it fails the AssertionError is caught by the catch and silently ignored. 
Moving from Throwable to ClassNotFoundException would be sufficient to start 
seeing the test failing.
   
   @rmannibucau you are absolutely correct.  Good catch!  
   
   In this PR, I'm adding the surefire exclude and changing the code to catch 
`ClassNotFoundException` instead of `Throwable`.
   
   Thanks!


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to