[ https://issues.apache.org/jira/browse/SCM-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17961678#comment-17961678 ]
ASF GitHub Bot commented on SCM-471: ------------------------------------ jira-importer commented on issue #687: URL: https://github.com/apache/maven-scm/issues/687#issuecomment-2964613252 **[Olivier Lamy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=olamy)** commented fixed in rev 774941. Thanks! > some TCK tests check for files in a position dependent way > ---------------------------------------------------------- > > Key: SCM-471 > URL: https://issues.apache.org/jira/browse/SCM-471 > Project: Maven SCM (Moved to GitHub Issues) > Issue Type: Bug > Components: maven-scm-api > Affects Versions: 1.2 > Reporter: Mark Struberg > Assignee: Olivier Lamy > Priority: Major > Fix For: 1.3 > > Attachments: SCM-471.patch > > > A few TCK tests like e.g. the CheckInCommandTckTest get a list of files > returned in the ScmResult and assume that those files are in an exact order. > But this order may be highly stochastic! So those tests seem to fail > sometimes! > What can we do: I wrote a small function in the baseclass of all TCK tests > ScmTckTestCase > {noformat} > protected Map/*<String, ScmFile>*/ mapFilesByPath( List/*<ScmFile*/ files ) > {noformat} > which should be called in such cases. > Afterwards the files may be accessed e.g. with: > {noformat} > Map fileMap = mapFilesByPath( files ); > ScmFile file1 = (ScmFile) fileMap.get( "src/main/java/Foo.java" ); > assertNotNull( file1 ); > assertEquals( ScmFileStatus.CHECKED_IN, file1.getStatus() ); > {noformat} > I've attached my changes as patch -- This message was sent by Atlassian Jira (v8.20.10#820010)