| testsuite.BaseTestCase
All known Subclasses: testsuite.regression.StressRegressionTest, testsuite.regression.NumbersRegressionTest, testsuite.simple.BlobTest, testsuite.regression.SubqueriesRegressionTest, testsuite.regression.StatementRegressionTest, testsuite.simple.DataSourceTest, testsuite.regression.ResultSetRegressionTest, testsuite.simple.XATest, testsuite.simple.DateTest, testsuite.simple.MiniAdminTest, testsuite.regression.CallableStatementRegressionTest, testsuite.regression.CachedRowsetTest, testsuite.regression.StringRegressionTest, testsuite.simple.StatementsTest, testsuite.simple.ServerControllerTest, testsuite.simple.NumbersTest, testsuite.simple.jdbc4.StatementsTest, testsuite.simple.SSLTest, testsuite.simple.TransactionTest, testsuite.regression.MicroPerformanceRegressionTest, testsuite.simple.CallableStatementTest, testsuite.regression.EscapeProcessorRegressionTest, testsuite.perf.RetrievalPerfTest, testsuite.simple.ConnectionTest, testsuite.regression.ConnectionRegressionTest, testsuite.simple.CharsetTests, testsuite.simple.ResultSetTest, testsuite.regression.AppletRegressionTest, testsuite.simple.UpdatabilityTest, testsuite.simple.MetadataTest, testsuite.regression.MetaDataRegressionTest, testsuite.regression.DataSourceRegressionTest, testsuite.regression.PooledConnectionRegressionTest, testsuite.perf.BasePerfTest, testsuite.simple.TraversalTest, testsuite.regression.BlobRegressionTest, testsuite.simple.EscapeProcessingTest,
BaseTestCase | abstract public class BaseTestCase extends TestCase (Code) | | Base class for all test cases. Creates connections, statements, etc. and
closes them.
author: Mark Matthews version: $Id: BaseTestCase.java 5440 2006-06-27 17:00:53 +0000 (Tue, 27 Jun version: 2006) mmatthews $ |
Method Summary | |
protected void | cleanupTempFiles(File exampleTempFile, String tempfilePrefix) | protected void | closeMemberJDBCResources() | protected void | createFunction(String functionName, String functionDefn) | protected void | createProcedure(String procedureName, String procedureDefn) | protected void | createSchemaObject(String objectType, String objectName, String columnsAndOtherStuff) | protected void | createTable(String tableName, String columnsAndOtherStuff) | protected void | dropFunction(String functionName) | protected void | dropProcedure(String procedureName) | protected void | dropSchemaObject(String objectType, String objectName) | protected void | dropTable(String tableName) | protected Connection | getAdminConnection() | protected Connection | getAdminConnectionWithProps(Properties props) | protected Connection | getConnectionWithProps(String propsList) | protected Connection | getConnectionWithProps(String url, String propsList) | protected Connection | getConnectionWithProps(Properties props) Returns a new connection with the given properties
Parameters: props - the properties to use (the URL will come from the standard forthis testcase). | protected Connection | getConnectionWithProps(String url, Properties props) | protected int | getInstanceNumber() | protected String | getMysqlVariable(Connection c, String variableName) | protected String | getMysqlVariable(String variableName) Returns the named MySQL variable from the currently connected server. | protected Properties | getPropertiesFromTestsuiteUrl() Returns the properties that represent the default URL used for
connections for all testcases. | protected int | getRowCount(String tableName) | protected Object | getSingleIndexedValueWithQuery(Connection c, int columnIndex, String query) | protected Object | getSingleIndexedValueWithQuery(int columnIndex, String query) | protected Object | getSingleValue(String tableName, String columnName, String whereClause) | protected Object | getSingleValueWithQuery(String query) | protected boolean | isAdminConnectionConfigured() | protected boolean | isClassAvailable(String classname) | protected boolean | isRunningOnJRockit() | protected boolean | isRunningOnJdk131() | protected boolean | isServerRunningOnWindows() | public void | logDebug(String message) | protected File | newTempBinaryFile(String name, long size) | protected String | randomString() | final protected boolean | runLongTests() | protected boolean | runMultiHostTests() | protected boolean | runTestIfSysPropDefined(String propName) | public void | setUp() Creates resources used by all tests. | public void | tearDown() Destroys resources created during the test case. | protected boolean | versionMeetsMinimum(int major, int minor) | protected boolean | versionMeetsMinimum(int major, int minor, int subminor) |
conn | protected Connection conn(Code) | | Connection to server, initialized in setUp() Cleaned up in tearDown().
|
dbUrl | protected static String dbUrl(Code) | | JDBC URL, initialized from com.mysql.jdbc.testsuite.url system property,
or defaults to jdbc:mysql:///test
|
pstmt | protected PreparedStatement pstmt(Code) | | PreparedStatement to be used in tests, not initialized. Cleaned up in
tearDown().
|
rs | protected ResultSet rs(Code) | | ResultSet to be used in tests, not initialized. Cleaned up in tearDown().
|
stmt | protected Statement stmt(Code) | | Statement to be used in tests, initialized in setUp(). Cleaned up in
tearDown().
|
BaseTestCase | public BaseTestCase(String name)(Code) | | Creates a new BaseTestCase object.
Parameters: name - The name of the JUnit test case |
cleanupTempFiles | protected void cleanupTempFiles(File exampleTempFile, String tempfilePrefix)(Code) | | |
closeMemberJDBCResources | protected void closeMemberJDBCResources()(Code) | | |
getConnectionWithProps | protected Connection getConnectionWithProps(Properties props) throws SQLException(Code) | | Returns a new connection with the given properties
Parameters: props - the properties to use (the URL will come from the standard forthis testcase). a new connection using the given properties. throws: SQLException - DOCUMENT ME! |
getInstanceNumber | protected int getInstanceNumber()(Code) | | Returns the per-instance counter (for messages when multi-threading
stress tests)
int the instance number |
getMysqlVariable | protected String getMysqlVariable(String variableName) throws SQLException(Code) | | Returns the named MySQL variable from the currently connected server.
Parameters: variableName - the name of the variable to return the value of the given variable, or NULL if it doesn't exist throws: SQLException - if an error occurs |
getPropertiesFromTestsuiteUrl | protected Properties getPropertiesFromTestsuiteUrl() throws SQLException(Code) | | Returns the properties that represent the default URL used for
connections for all testcases.
properties parsed from com.mysql.jdbc.testsuite.url throws: SQLException - if parsing fails |
isAdminConnectionConfigured | protected boolean isAdminConnectionConfigured()(Code) | | |
isClassAvailable | protected boolean isClassAvailable(String classname)(Code) | | |
isRunningOnJRockit | protected boolean isRunningOnJRockit()(Code) | | |
isRunningOnJdk131 | protected boolean isRunningOnJdk131()(Code) | | |
isServerRunningOnWindows | protected boolean isServerRunningOnWindows() throws SQLException(Code) | | |
runLongTests | final protected boolean runLongTests()(Code) | | |
runMultiHostTests | protected boolean runMultiHostTests()(Code) | | |
runTestIfSysPropDefined | protected boolean runTestIfSysPropDefined(String propName)(Code) | | Checks whether a certain system property is defined, in order to
run/not-run certain tests
Parameters: propName - the property name to check for true if the property is defined. |
setUp | public void setUp() throws Exception(Code) | | Creates resources used by all tests.
throws: Exception - if an error occurs. |
tearDown | public void tearDown() throws Exception(Code) | | Destroys resources created during the test case.
throws: Exception - DOCUMENT ME! |
versionMeetsMinimum | protected boolean versionMeetsMinimum(int major, int minor) throws SQLException(Code) | | Checks whether the database we're connected to meets the given version
minimum
Parameters: major - the major version to meet Parameters: minor - the minor version to meet boolean if the major/minor is met throws: SQLException - if an error occurs. |
versionMeetsMinimum | protected boolean versionMeetsMinimum(int major, int minor, int subminor) throws SQLException(Code) | | Checks whether the database we're connected to meets the given version
minimum
Parameters: major - the major version to meet Parameters: minor - the minor version to meet boolean if the major/minor is met throws: SQLException - if an error occurs. |
|
|