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, runTest
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, toString
private 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.TestCase
java.lang.Exception
public 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.SQLException
public void testCondition2() throws java.sql.SQLException
java.sql.SQLException
public void testCondition3() throws java.sql.SQLException
java.sql.SQLException
public void testCondition4() throws java.sql.SQLException
java.sql.SQLException
public void testWarehouseRows() throws java.lang.Exception
java.lang.Exception
public void testStockRows() throws java.lang.Exception
java.lang.Exception
public void testOrdersRows() throws java.lang.Exception
java.lang.Exception
public void testDistrictRows() throws java.lang.Exception
java.lang.Exception
public void testCustomerRows() throws java.lang.Exception
java.lang.Exception
public void testItemRows() throws java.lang.Exception
java.lang.Exception
public void testNewOrdersRows() throws java.lang.Exception
java.lang.Exception
public void testHistoryRows() throws java.lang.Exception
java.lang.Exception
public void testOrderLineRows() throws java.lang.Exception
java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.