[
https://issues.apache.org/jira/browse/SCM-244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963129#comment-17963129
]
ASF GitHub Bot commented on SCM-244:
------------------------------------
jira-importer commented on issue #1021:
URL: https://github.com/apache/maven-scm/issues/1021#issuecomment-2964639450
**[Ryan
Daum](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rdaum)**
commented
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: https://issues.apache.org/jira/browse/SCM-244
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-api
> Environment: Linux 2.6, JDK 1.5, Maven 2
> Reporter: Ryan Daum
> Assignee: Emmanuel Venisse
> Priority: Major
> Fix For: 1.0-rc1
>
> Attachments: ChangeLogCommandTckTest-SCM-244.patch,
> 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 was sent by Atlassian Jira
(v8.20.10#820010)