[ https://issues.apache.org/jira/browse/SCM-939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963743#comment-17963743 ]
ASF GitHub Bot commented on SCM-939: ------------------------------------ jira-importer commented on issue #1165: URL: https://github.com/apache/maven-scm/issues/1165#issuecomment-2964649565 **[Elliotte Rusty Harold](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=elharo)** commented Problem is PlexusTestCase.setUp catches AssumptionViolatedException and converts it into an AssertionFailure. This is your weekly reminder never to catch java.lang.Exception. `}}{{try` ` {` ` configuration = getCustomConfiguration();``if ( configuration == null )` ` {` ` configuration = getConfiguration();` ` `} ` `} ` catch ( Exception e )` ` {` ` System.out.println( "Error with configuration:" );``System.out.println( "configuration = " + configuration );``fail( e.getMessage() );` ` `} > Assume SCM is present > --------------------- > > Key: SCM-939 > URL: https://issues.apache.org/jira/browse/SCM-939 > Project: Maven SCM (Moved to GitHub Issues) > Issue Type: Bug > Reporter: Elliotte Rusty Harold > Assignee: Michael Osipov > Priority: Minor > Fix For: 2.1.0 > > > We have a lot of tests that do something like this: > > if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVN_COMMAND_LINE ) ) > { > ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVN_COMMAND_LINE, > getName() ); > return; > } > > We should instead use org.*junit*.*Assume* here so these are marked as > skipped rather than passed. > -- This message was sent by Atlassian Jira (v8.20.10#820010)