public class ClassLoaderTestSetup extends BaseJDBCTestSetup
| Modifier and Type | Field and Description |
|---|---|
private java.lang.ClassLoader |
oldLoader |
| Constructor and Description |
|---|
ClassLoaderTestSetup(junit.framework.Test test)
Create a decorator that makes
test run with non-default
class loader. |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.ClassLoader |
getThreadLoader()
Retrieve the class loader currently being used by this thread.
|
private static java.lang.ClassLoader |
makeClassLoader() |
static void |
setThreadLoader(java.lang.ClassLoader which)
Force this thread to use a specific class loader.
|
protected void |
setUp() |
protected void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
clearConnection, getConnection, getTestConfiguration, printlnrunbasicRun, countTestCases, getTest, toStringassertEquals, 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, formatpublic ClassLoaderTestSetup(junit.framework.Test test)
test run with non-default
class loader. It also shuts down the engine so Derby classes will
be loaded with the new class loader.test - the test to decorateprivate static java.lang.ClassLoader makeClassLoader()
protected void setUp()
throws java.lang.Exception
setUp in class junit.extensions.TestSetupjava.lang.Exceptionprotected void tearDown()
throws java.lang.Exception
BaseJDBCTestSetuptearDown in class BaseJDBCTestSetupjava.lang.Exceptionpublic static void setThreadLoader(java.lang.ClassLoader which)
which - class loader to setjava.lang.SecurityException - if the current thread cannot set the context ClassLoaderpublic static java.lang.ClassLoader getThreadLoader()
Retrieve the class loader currently being used by this thread.
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.