You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Olivier Lamy (JIRA)" <ji...@codehaus.org> on 2009/05/14 23:51:45 UTC

[jira] Closed: (SCM-471) some TCK tests check for files in a position dependent way

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

Olivier Lamy closed SCM-471.
----------------------------

    Resolution: Fixed

fixed in rev 774941.
Thanks!

> 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
>            Assignee: Olivier Lamy
>             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 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