|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.osesb.utilities.junit.OSESBTestCase
org.osesb.utilities.junit.OSESBThreadedTestCase
org.osesb.objectpools.test.ThreadedPooledValidatingSAXParserTest
public class ThreadedPooledValidatingSAXParserTest
THIS TEST PROVES THAT SCHEMA VALIDATION USING XERCES IS INCOMPATIBLE WITH APACHE OBJECT POOLS. Threaded SAXPoolFactory Test for a validating parser configuration using:
1. Using a org.xml.sax.EntityResolver to resolve schema declarations to locations in the configured instance of the XML repository. THIS TEST FAILS. We get a SAXParseException: 'Document is invalid: no grammar found', even though the EntityResolver resolves and returns the schema. So the suite passes, a non-pooled call to ParseSAX has been substituted for the parse() call to the pooled parser. We cannot use a org.xml.sax.EntityResolver with pooled parsers. 2. jaxp v1.2-style validation, where the schema sources are set using parser properties. The parser properties are set using the namespace of the XML document, if any, and a File[] of schema sources. THIS TEST FAILS. We get a SAXParseException: Document is invalid: no grammar found. So the suite passes, a non-pooled call to ParseSAX has been substituted for the parse() call to the pooled parser. We cannot use jaxp v1.2-style validation with pooled parsers. Collects parser statistics and reports average time to parse across all threads in milliseconds.
| Field Summary |
|---|
| Fields inherited from class org.osesb.utilities.junit.OSESBThreadedTestCase |
|---|
numberOfIterations, numberOfTestThreads, threadDelay |
| Fields inherited from class org.osesb.utilities.junit.OSESBTestCase |
|---|
configFile, log, reader, testDataDirectory, testProperties, thisClassName |
| Constructor Summary | |
|---|---|
ThreadedPooledValidatingSAXParserTest(java.lang.String name)
Construct a new instance. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
The main method runs all the tests in the text ui |
void |
setUp()
This method is called before a test is executed. |
static junit.framework.Test |
suite()
The suite method runs all the tests |
void |
tearDown()
This method is called after a test is executed. |
void |
testPooledSAXParserValidatingUsingEntityResolver()
Test validating PooledSAXParser with an org.xml.sax.EntityResolver to resolve schema declarations to locations in the configured instance of the XML repository.. |
void |
testPooledSAXParserValidatingUsingSchemaSource()
Test validating PooledSAXParser using jaxp v1.2-style validation, where the schema locations are set using parser properties. |
| Methods inherited from class org.osesb.utilities.junit.OSESBThreadedTestCase |
|---|
displayStartupMessage |
| Methods inherited from class org.osesb.utilities.junit.OSESBTestCase |
|---|
getBooleanTestProperty, getIntTestProperty, getLongTestProperty, getTestResourcesAsStreams, getTestResourcesAsText, getTestResourcesFiles, loadTestProperties, readTestFilesAsStreams |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadedPooledValidatingSAXParserTest(java.lang.String name)
| Method Detail |
|---|
public static junit.framework.Test suite()
public void setUp()
throws java.lang.Exception
setUp in class OSESBTestCasejava.lang.Exception
public void tearDown()
throws java.lang.Exception
tearDown in class OSESBTestCasejava.lang.Exceptionpublic static void main(java.lang.String[] args)
public void testPooledSAXParserValidatingUsingEntityResolver()
throws java.lang.Exception
java.lang.Exception
public void testPooledSAXParserValidatingUsingSchemaSource()
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||