[
http://jira.codehaus.org/browse/SCM-244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan Daum updated SCM-244:
--------------------------
Attachment: maven-scm-test-TickPatch.patch
Here is a patch which adds a two second delay between changelog comparisons,
for the case of faster SCMs.
> In maven-scm-test, ChangeLogCommandTckTest relies on unreliable timing and
> fails for some SCM systems
> -----------------------------------------------------------------------------------------------------
>
> Key: SCM-244
> URL: http://jira.codehaus.org/browse/SCM-244
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-api
> Environment: Linux 2.6, JDK 1.5, Maven 2
> Reporter: Ryan Daum
> Attachments: maven-scm-test-TickPatch.patch
>
>
> I encountered this problem while fixing a new Mercurial SCM provider so that
> all its unit tests pass.
> A Mercurial repository which can reproduce the bug can be found at
> http://darksleep.com/~ryan/maven-scm-provider-hg.cgi -- use the mercurial
> client to clone this repository. The problem manifests itself in
> HgChangeLogCommandTckTest.
> ChangeLogCommandTckTestchecks in two revisions in sequence, and records the
> time between them. It then tries, using date/time filtering to retrieve only
> the later one.
> This may work fine for slower network based revision control systems where
> there is an appreciable pause between checkins, but for Mercurial, the
> creation of the file and its checkin often happens within the same second and
> so the log reports the same time for creation of both revisions.
> Therefore during the date-time range query, nothing fits _between_ the date
> filter range.
> In _some_ cases, if the checkin happens of the second file happens to occur
> after the second value of the date increments, the test passes, but this is
> the exception to the rule.
> The fix would be to modify ChangeLogCommandTckTest to perform a sleep of at
> least 1 second between checkins.
> To reproduce, checkout (as mentioned above) the Mercurial SCM provider and
> run the unit tests. You will see HgChangeLogCommandTckTest fail in the
> manner described above.
--
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