Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-471

some TCK tests check for files in a position dependent way

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.3
    • maven-scm-api
    • 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

      Attachments

        1. SCM-471.patch
          3 kB
          Mark Struberg

        Activity

          People

            olamy Olivier Lamy
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: