Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
Patch
Description
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
protected Map/*<String, ScmFile>*/ mapFilesByPath( List/*<ScmFile*/ files )
which should be called in such cases.
Afterwards the files may be accessed e.g. with:
Map fileMap = mapFilesByPath( files ); ScmFile file1 = (ScmFile) fileMap.get( "src/main/java/Foo.java" ); assertNotNull( file1 ); assertEquals( ScmFileStatus.CHECKED_IN, file1.getStatus() );
I've attached my changes as patch