public class Checks extends JDBCPerfTestCase
| Modifier and Type | Field and Description |
|---|---|
private OEChecks |
check
Run checks on OE database
|
private short |
scale
Warehouse scaling factor
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
Checks(java.lang.String name) |
Checks(java.lang.String name,
short scale) |
| Modifier and Type | Method and Description |
|---|---|
static junit.framework.Test |
checkAllRowCounts(short scale)
Return suite of tests that checks the row counts for all the tables in
the Order Entry bechmark.
|
static junit.framework.Test |
consistencyChecks()
Consistency checks per Section 3.3.2 of TPC-C spec
|
void |
setUp() |
static junit.framework.Test |
suite() |
void |
testCondition1()
Section 3.3.2.1 of TPC-C specification.
|
void |
testCondition2()
Section 3.3.2.2 Consistency Condition 2 (TPC-C spec) Entries in the
DISTRICT, ORDER, and NEW-ORDER tables must satisfy the relationship:
D_NEXT_O_ID - 1 = max(O_ID) = max(NO_O_ID) for each district defined by
(D_W_ID = O_W_ID = NO_W_ID) and (D_ID = O_D_ID = NO_D_ID).
|
void |
testCondition3()
3.3.2.3 Consistency Condition 3
Entries in the NEW-ORDER table must
satisfy the relationship: max(NO_O_ID) - min(NO_O_ID) + 1 = [number of
rows in the NEW-ORDER table for this district] for each district defined
by NO_W_ID and NO_D_ID.
|
void |
testCondition4()
3.3.2.4 Consistency Condition 4
Entries in the ORDER and ORDER-LINE
tables must satisfy the relationship: sum(O_OL_CNT) = [number of rows in
the ORDER-LINE table for this district] for each district defined by
(O_W_ID = OL_W_ID) and (O_D_ID = OL_D_ID).
|
void |
testCustomerRows()
Test cardinality of CUSTOMER table
|
void |
testDistrictRows()
Test cardinality of DISTRICT table
|
void |
testHistoryRows()
Test cardinality of HISTORY table
|
void |
testItemRows()
Test cardinality of ITEM table
|
void |
testNewOrdersRows()
Test cardinality of NEWORDERS table
|
void |
testOrderLineRows()
Test cardinality of ORDERLINE table
|
void |
testOrdersRows()
Test cardinality of ORDERS table
|
void |
testStockRows()
Test cardinality of STOCK table
|
void |
testWarehouseRows()
Test cardinality of WAREHOUSE table
|
runBareOverridable, runTestassertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, toStringprivate short scale
private OEChecks check
public Checks(java.lang.String name)
public Checks(java.lang.String name,
short scale)
name - -
test namescale - -warehouse scale factorpublic void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.Exceptionpublic static junit.framework.Test checkAllRowCounts(short scale)
scale - public static junit.framework.Test consistencyChecks()
public static junit.framework.Test suite()
public void testCondition1()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCondition2()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCondition3()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCondition4()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testWarehouseRows()
throws java.lang.Exception
java.lang.Exceptionpublic void testStockRows()
throws java.lang.Exception
java.lang.Exceptionpublic void testOrdersRows()
throws java.lang.Exception
java.lang.Exceptionpublic void testDistrictRows()
throws java.lang.Exception
java.lang.Exceptionpublic void testCustomerRows()
throws java.lang.Exception
java.lang.Exceptionpublic void testItemRows()
throws java.lang.Exception
java.lang.Exceptionpublic void testNewOrdersRows()
throws java.lang.Exception
java.lang.Exceptionpublic void testHistoryRows()
throws java.lang.Exception
java.lang.Exceptionpublic void testOrderLineRows()
throws java.lang.Exception
java.lang.ExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.