| java.lang.Object org.apache.derbyTesting.functionTests.tests.store.BaseTest
All known Subclasses: org.apache.derbyTesting.functionTests.tests.storetests.st_reclaim_longcol, org.apache.derbyTesting.functionTests.tests.storetests.st_derby715, org.apache.derbyTesting.functionTests.tests.store.OnlineCompressTest, org.apache.derbyTesting.functionTests.tests.store.dropcrash,
BaseTest | abstract public class BaseTest (Code) | | Common utility functions that can be shared across store .java tests.
If more than one store tests wants a function, put it here rather than copy
it. Hopefully going forward, with enough utility functions adding new store
tests will be easier. New store tests should extend this test to pick
up access to utility routines - see OnlineCompressTest.java as an example.
|
Method Summary | |
protected void | beginTest(Connection conn, String str) | protected boolean | checkAllConsistency(Connection conn) Call consistency checker on all the tables. | protected boolean | checkConsistency(Connection conn, String schemaName, String tableName) Call consistency checker on the table. | protected void | createDebugSystemProcedures(Connection conn) Create a system procedures to access SANE debug table routines. | public void | createTable(Connection conn, String tbl_name, String create_str) create given table on the input connection. | String | dump_table(Connection conn, String schemaName, String tableName, boolean commit_transaction) Return string with table information. | protected void | endTest(Connection conn, String str) | public void | executeQuery(Connection conn, String stmt_str, boolean commit_query) Simple wrapper to execute a sql string. | protected int[] | getSpaceInfo(Connection conn, String schemaName, String tableName, boolean commit_xact) | protected String | get_lock_info(Connection conn, boolean include_system_locks) Get lock table. | protected void | log(String str) | protected void | logError(String str) | void | runTests(String[] argv) | abstract public void | testList(Connection conn) | protected void | testProgress(String str) | protected int | total_pages(int[] space_info) Given output from getSpaceInfo(), return total pages in file. |
SPACE_INFO_ESTIMSPACESAVING | final protected static int SPACE_INFO_ESTIMSPACESAVING(Code) | | |
SPACE_INFO_IS_INDEX | final protected static int SPACE_INFO_IS_INDEX(Code) | | call the space table vti.
Utility test function to call the space table vti to get information
about allocated and free pages. Information is passed back in an
int array as follows:
is_index = ret_info[0];
num_alloc = ret_info[1];
num_free = ret_info[2];
page_size = ret_info[3];
estimate_space_savings = ret_info[4];
the space information about the table. exception: StandardException - Standard exception policy. |
SPACE_INFO_NUMCOLS | final protected static int SPACE_INFO_NUMCOLS(Code) | | |
SPACE_INFO_NUM_ALLOC | final protected static int SPACE_INFO_NUM_ALLOC(Code) | | |
SPACE_INFO_NUM_FREE | final protected static int SPACE_INFO_NUM_FREE(Code) | | |
SPACE_INFO_NUM_UNFILLED | final protected static int SPACE_INFO_NUM_UNFILLED(Code) | | |
SPACE_INFO_PAGE_SIZE | final protected static int SPACE_INFO_PAGE_SIZE(Code) | | |
verbose | protected static boolean verbose(Code) | | |
BaseTest | public BaseTest()(Code) | | |
checkAllConsistency | protected boolean checkAllConsistency(Connection conn) throws SQLException(Code) | | Call consistency checker on all the tables.
|
createDebugSystemProcedures | protected void createDebugSystemProcedures(Connection conn) throws SQLException(Code) | | Create a system procedures to access SANE debug table routines.
|
createTable | public void createTable(Connection conn, String tbl_name, String create_str) throws SQLException(Code) | | create given table on the input connection.
Takes care of dropping the table if it exists already.
exception: StandardException - Standard exception policy. |
dump_table | String dump_table(Connection conn, String schemaName, String tableName, boolean commit_transaction) throws SQLException(Code) | | Return string with table information.
Dumps summary store information about the table, also dumps extra
information about individual pages into the error log file.
|
get_lock_info | protected String get_lock_info(Connection conn, boolean include_system_locks) throws SQLException(Code) | | Get lock table.
Returns a single string with a dump of the entire lock table.
The lock table. Parameters: conn - The connection to use. Parameters: include_system_locks - If true include non-user locks like thoserequested by background internal threads. |
total_pages | protected int total_pages(int[] space_info)(Code) | | Given output from getSpaceInfo(), return total pages in file.
simply the sum of allocated and free pages.
|
|
|