org.apache.derbyTesting.perf.basic.jdbc
Class BaseLoad100TestSetup
java.lang.Object
junit.framework.Assert
junit.extensions.TestDecorator
junit.extensions.TestSetup
org.apache.derbyTesting.junit.BaseTestSetup
org.apache.derbyTesting.junit.BaseJDBCTestSetup
org.apache.derbyTesting.junit.CleanDatabaseTestSetup
org.apache.derbyTesting.perf.basic.jdbc.BaseLoad100TestSetup
- All Implemented Interfaces:
- junit.framework.Test
- Direct Known Subclasses:
- BaseLoad100IdxTestSetup
public class BaseLoad100TestSetup
- extends CleanDatabaseTestSetup
TestSetup decorator to load the schema that is used for some of the
performance tests.
Schema includes:
Table: is 9 column table (100bytes) - 5 columns of type int, 4 columns of char(20)")
data distribution - { column 1 has unique values,column 2 is set to 2,
column 3 has 1 % of rows with same value, column 4 is set to 2,
column 5 has unique values, column 6 is set to a constant value,
column 7 has 1% of rows with known pattern,
column 8 has constant value,column 9 has values having the same suffix.
Connection props : autocommit - false, default isolation level- Read Committed.
If any indexes have to be created or any other schema additions need to be made, then
the decorateSQL() method needs to be overriden.
| Fields inherited from class junit.extensions.TestDecorator |
fTest |
|
Method Summary |
protected void |
decorateSQL(java.sql.Statement s)
Override the decorateSQL and create the necessary schema. |
private void |
loadData(java.sql.PreparedStatement insert)
Load the data into the table. |
protected void |
setUp()
Clean the default database using the default connection
and calls the decorateSQL to allow sub-classes to
initialize their schema requirments. |
| Methods inherited from class junit.extensions.TestDecorator |
basicRun, countTestCases, getTest, 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
rowsToLoad
protected int rowsToLoad
tableName
protected java.lang.String tableName
BaseLoad100TestSetup
public BaseLoad100TestSetup(junit.framework.Test test)
- Parameters:
test -
BaseLoad100TestSetup
public BaseLoad100TestSetup(junit.framework.Test test,
int rowsToLoad)
- Parameters:
test - name of testrowsToLoad - number of rows to insert
BaseLoad100TestSetup
public BaseLoad100TestSetup(junit.framework.Test test,
java.lang.String tableName)
- Parameters:
test - name of the testtableName - name of the table to insert the rows into
BaseLoad100TestSetup
public BaseLoad100TestSetup(junit.framework.Test test,
int rowsToLoad,
java.lang.String tableName)
- Parameters:
test - name of testrowsToLoad - number of rows to inserttableName - name of the table to insert the rows into
setUp
protected void setUp()
throws java.lang.Exception
- Clean the default database using the default connection
and calls the decorateSQL to allow sub-classes to
initialize their schema requirments.
- Overrides:
setUp in class CleanDatabaseTestSetup
- Throws:
java.lang.Exception
decorateSQL
protected void decorateSQL(java.sql.Statement s)
throws java.sql.SQLException
- Override the decorateSQL and create the necessary schema.
- Overrides:
decorateSQL in class CleanDatabaseTestSetup
- Throws:
java.sql.SQLException- See Also:
CleanDatabaseTestSetup.decorateSQL(java.sql.Statement)
loadData
private void loadData(java.sql.PreparedStatement insert)
throws java.lang.Exception
- Load the data into the table.
- Parameters:
insert - prepared statement to use for inserting data.
- Throws:
java.lang.Exception
Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.