[
https://issues.apache.org/jira/browse/XERCESJ-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16276398#comment-16276398
]
Stephan Trebels commented on XERCESJ-1687:
------------------------------------------
The t.join is needed, so the results can be collected before the unit test
completes. The test kicks off parallel threads and the main thread keeps
running. Assert can only check the failedCount, when all threads have
completed. So, the t.join is needed to avoid false negative.
count=1: it works fine, it does not fail for me in 10 tries.
count=2: it fails 5 out of 11 tries.
count=4: it fails 5 out of 10 tries.
count=10: it fails 5 out of 10 tries.
count=50: it fails 10 out of 10 tries.
THe Xerces XSD 1.1 implementation is supposed to implement the JAXP Schema
contract. The contract explicitly says:
<quote>
A Schema object is thread safe and applications are encouraged to share it
across many parsers in many threads.
</quote>
This claimed feature is certainly not present in the XSD 1.1 assert
implementation in this SVN branch. With a fixed Eclipse XPath all of the
parallel tests succeed,
> XSD 1.1 validation with xs:assert is not thread safe
> ----------------------------------------------------
>
> Key: XERCESJ-1687
> URL: https://issues.apache.org/jira/browse/XERCESJ-1687
> Project: Xerces2-J
> Issue Type: Bug
> Components: JAXP (javax.xml.validation)
> Affects Versions: 2.12.0
> Environment: java 8 / java 9
> Reporter: Stephan Trebels
> Priority: Critical
> Attachments: parallel-test.zip
>
>
> The XSD 1.1 validation code uses eclipse webtools xpath to validate
> assertions. The PsychoPath XPath 2.0 engine has a bug in
> ResultSequenceFactory, which invalidates correct execution in all parallel
> invocation of XSD 1.1 validation.
> This issue affects completely unrelated schemas and input XML, as long as
> both use assertions. The effect is a lot of spurious assert violations. The
> issue is visible even if only two threads are used in parallel.
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=527812
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]