| org.apache.tools.ant.taskdefs.SQLExecTest
SQLExecTest | public class SQLExecTest extends TestCase (Code) | | Simple testcase to test for driver caching.
To test for your own database, you may need to tweak getProperties(int)
and add a couple of keys. see testOracle and testMySQL for an example.
It would be much better to extend this testcase by using HSQL
as the test db, so that a db is really used.
|
Inner Class :public static class NullDriver implements Driver | |
MYSQL | final public static int MYSQL(Code) | | |
NULL | final public static int NULL(Code) | | |
ORACLE | final public static int ORACLE(Code) | | |
doMultipleCalls | protected void doMultipleCalls(int calls, int database, boolean caching, boolean catchexception)(Code) | | run a sql tasks multiple times.
Parameters: calls - number of times to execute the task Parameters: database - the database to execute on. Parameters: caching - should caching be enabled ? Parameters: catchexception - true to catch exception for each call, false if not. |
findResourcePath | protected String findResourcePath(String resource)(Code) | | try to find the path from a resource (jar file or directory name)
so that it can be used as a classpath to load the resource.
|
getProperties | protected Properties getProperties(int database)(Code) | | returns a configuration associated to a specific database.
If you want to test on your specific base, you'd better
tweak this to make it run or add your own database.
The driver lib should be dropped into the system classloader.
|
testDriverCaching | public void testDriverCaching()(Code) | | |
|
|