Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running unit tests picketlink #159

Open
matejsp opened this issue Apr 12, 2013 · 0 comments
Open

Problem running unit tests picketlink #159

matejsp opened this issue Apr 12, 2013 · 0 comments

Comments

@matejsp
Copy link

matejsp commented Apr 12, 2013

There is a problem running unit tests.
1.
JAXP: using thread context class loader (sun.misc.Launcher$AppClassLoader@9cab16) for search
JAXP: Looking up system property 'javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema'
JAXP: The value is 'org.apache.xerces.jaxp.validation.XMLSchemaFactory'
JAXP: createInstance(org.apache.xerces.jaxp.validation.XMLSchemaFactory)
java.lang.ClassNotFoundException: org.apache.xerces.jaxp.validation.XMLSchemaFactory

Solution is to add test depedency:
apache-xerces, xercesImpl, 2.9.1, test

a lot of warnings:
Warning: encoding "UTF-8" not supported, using UTF-8

Failed tests: testStore(org.picketlink.test.identity.federation.core.saml.v2.metadata.FileBasedMetadataConfigurationStoreUnitTestCase): Did not delete the metadata persistent file

The unit test in question:

@Test
public void testStore() throws Exception {
    SAMLParser parser = new SAMLParser();

    ClassLoader tcl = Thread.currentThread().getContextClassLoader();
    InputStream is = tcl.getResourceAsStream("saml2/metadata/idp-entitydescriptor.xml");
    assertNotNull("Inputstream not null", is);

    EntityDescriptorType edt = (EntityDescriptorType) parser.parse(is);
    assertNotNull(edt);
    FileBasedMetadataConfigurationStore fbd = new FileBasedMetadataConfigurationStore();
    fbd.persist(edt, id);

    EntityDescriptorType loaded = fbd.load(id);
    assertNotNull("loaded EntityDescriptorType not null", loaded);
    fbd.delete(id);

    try {
        fbd.load(id);
        fail("Did not delete the metadata persistent file");
    } catch (Exception t) {
        // pass
    }
}

Enviroment:
Windows 7 SP1
jdk1.6.0_33 (32 bit)
Apache Maven 3.0.5

Build log:
https://gist.github.com/matejsp/5370277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant