[ https://issues.apache.org/jira/browse/SCM-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17964639#comment-17964639 ]
Olivier Lamy commented on SCM-471: ---------------------------------- This project has moved from Jira to GitHub Issues. This issue was migrated to [apache/maven-scm#687|https://github.com/apache/maven-scm/issues/687]. > 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)