Summary: | Improve Java unit testing | ||
---|---|---|---|
Product: | Security - Now in JIRA | Reporter: | coheigea <coheigea> |
Component: | Signature | Assignee: | XML Security Developers Mailing List <security-dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | Java 1.4.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: |
A patch for this issue
A second patch for this issue Patch no. 3 |
Description
coheigea
2009-05-25 06:29:34 UTC
Created attachment 23714 [details]
A patch for this issue
Attached is a patch for these issues.
Namely, "ant test" only runs the src_unitTests\org\apache\xml\security\test\AllTests.java test suite, which in turn runs all of the org.apache test suites, whereas before most of these tests were run twice. I also removed a lot of the test output to System.out.
I couldn't find out why one of the javax unit tests, IaikCoreFeaturesTest, was failing. I checked the 1.4.2 and 1.4.1 release tags, and the test was failing in both of these tags.
Created attachment 23888 [details] A second patch for this issue This is part two of a patch for improving the unit tests. This patch fixes the failing IaikCoreFeaturesTest. The test verifies an iaik test signature which contains a number of different references. One of the references is to the document found here: http://www.w3.org/TR/2000/REC-xml-20001006 The reason signature verification was failing is that this document seems to have been modified since the signature was created....specifically, it used to be: <html lang="EN"> but now it has: <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> and so the digest comparison fails. I changed the test by adding a URIDerefencer which points to a local copy of the document in "data" which was there previously and doesn't have the additional default namespace. Colm. Created attachment 23898 [details]
Patch no. 3
Patch no. 3 for cleaning up the tests.
This patch stops the Baltimore interop test writing out bad signatures to the "data" directory...these particular tests are expected to fail, and we shouldn't be writing anything to a directory that isn't cleaned with ant/mvn clean.
Patches applied. Colm. |