[ 
http://jira.codehaus.org/browse/SCM-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Struberg updated SCM-471:
------------------------------

    Attachment: SCM-471.patch

> some TCK tests check for files in a position dependent way
> ----------------------------------------------------------
>
>                 Key: SCM-471
>                 URL: http://jira.codehaus.org/browse/SCM-471
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-api
>    Affects Versions: 1.2
>            Reporter: Mark Struberg
>         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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to