MySQL 5.6.14 Source Code Document
|
Classes | |
class | StuffToDo |
Public Member Functions | |
void | localSetUp () |
void | test () |
void | createOrder (Session session, Random random) |
void | updateOrder (Session session, Random random, Query< OrderLine > query) |
void | deleteOrder (Session session, Random random, Query< OrderLine > query) |
Protected Member Functions | |
boolean | getDebug () |
![]() | |
boolean | getCleanupAfterTest () |
void | setAutoCommit (Connection connection, boolean b) |
void | createEmployeeInstances (int count) |
void | consistencyCheck (Employee emp) |
void | createDn2idInstances (int number) |
void | consistencyCheck (Dn2id dn2id) |
List< Object[]> | getExpected () |
String | getTableName () |
int | getNumberOfInstances () |
ColumnDescriptor[] | getColumnDescriptors () |
Object | getColumnValue (int i, int j) |
void | writeJDBCreadNDB () |
void | writeJDBCreadJDBC () |
void | writeNDBreadNDB () |
void | writeNDBreadJDBC () |
void | queryAndVerifyResults (String where, ColumnDescriptor[] columnDescriptors, String conditions, Object[] parameters, int...objectIds) |
List< Object[]> | queryJDBC (ColumnDescriptor[] columnDescriptors, String conditions, Object[] parameters) |
void | verifyQueryResults (String where, List< Object[]> results, int...objectIds) |
void | verify (String where, List< Object[]> expecteds, List< Object[]> actuals) |
void | generateInstances (ColumnDescriptor[] columnDescriptors) |
IdBase | getNewInstance (Class<?extends IdBase > modelClass) |
void | writeToJDBC (ColumnDescriptor[] columnDescriptors, List< IdBase > instances) |
void | writeToNDB (ColumnDescriptor[] columnDescriptors, List< IdBase > instances) |
List< Object[]> | readFromNDB (ColumnDescriptor[] columnDescriptors) |
List< Object[]> | readFromJDBC (ColumnDescriptor[] columnDescriptors) |
String | getA1for (int number, int index) |
String | getA3for (long i) |
void | createAllPrimitivesInstances (int number) |
void | createAllPrimitivesInstances (Session session, int number) |
AllPrimitives | createAllPrimitiveInstance (Session session, int i) |
void | initialize (AllPrimitives instance, int i) |
![]() | |
void | addTearDownClasses (Class<?>...classes) |
void | createSessionFactory () |
Properties | modifyProperties () |
void | dumpSystemProperties () |
void | error (String message) |
void | error (String context, Exception ex) |
void | errorIfNotEqual (String message, Object expected, Object actual) |
void | errorIfNotEqual (String message, int[] expected, int[] actual) |
void | errorIfEqual (String message, Object expected, Object actual) |
void | failOnError () |
void | closeConnection () |
void | getConnection (Properties extraProperties) |
Connection | getConnection () |
void | getConnection (String propertiesFileName) |
void | loadDriver () |
void | initializeErrorMessages () |
void | initializeJDBC () |
void | initializeSchema () |
void | loadProperties () |
void | loadProperties (String propsFileName) |
void | loadSchema () |
void | loadSchemaDefinition () |
void | localTearDown () |
final void | setUp () throws Exception |
final void | tearDown () throws Exception |
void | removeAll (Class<?> cls) |
boolean | testSchema () |
boolean | resetSchema () |
String | dump (List< String > list) |
Additional Inherited Members | |
![]() | |
static long | getMillisFor (int year, int month, int day, int hour, int minute, int second) |
static long | getMillisFor (int year, int month, int day) |
static long | getMillisFor (int days, int hour, int minute, int second) |
static void | resetLocalSystemDefaultTimeZone (Connection connection) |
static Object[] | setupDn2idPK () |
![]() | |
List< Employee > | employees |
List< Dn2id > | dn2ids |
List< IdBase > | instances = new ArrayList<IdBase>() |
ClassLoader | loader |
![]() | |
static TimeZone | localSystemTimeZone = TimeZone.getDefault() |
static final long | ONE_SECOND = 1000L |
static final long | ONE_MINUTE = 1000L * 60L |
static final long | ONE_HOUR = 1000L * 60L * 60L |
static final long | TEN_HOURS = 1000L * 60L * 60L * 10L |
static final long | ONE_DAY = 1000L * 60L * 60L * 24L |
static Object[] | dn2idPK = setupDn2idPK() |
Definition at line 36 of file MultithreadedTest.java.
|
inline |
Create a new order. Add a new order with a random number of order lines and a random unit price and quantity.
session | the session |
random | a random number generator |
Definition at line 243 of file MultithreadedTest.java.
|
inline |
Delete an order from the database.
session | the session |
random | a random number generator |
query | the query instance to query for OrderLines by OrderId |
Definition at line 343 of file MultithreadedTest.java.
|
inlineprotected |
Subclasses can override this method to get debugging info printed to System.out
Reimplemented from testsuite.clusterj.AbstractClusterJTest.
Definition at line 39 of file MultithreadedTest.java.
|
inline |
Subclasses may override this method to allocate any data and resources that they need in order to successfully execute this testcase. Adding teardown classes and instances is done in the overridden method.
Reimplemented from testsuite.clusterj.AbstractClusterJModelTest.
Definition at line 80 of file MultithreadedTest.java.
|
inline |
The test method creates numberOfThreads threads and starts them. Once the threads are started, the main thread waits until all threads complete. The main thread then checks that the proper number of instances are created in the database and verifies that all orders are consistent with their order lines. Inconsistency might be due to thread interaction or improper database updates.
Definition at line 119 of file MultithreadedTest.java.
|
inline |
Update an order; change one or more order lines
session | the session |
random | a random number generator |
query |
Definition at line 285 of file MultithreadedTest.java.