*/
public void testBasicDb()
throws Throwable {
try {
TransactionStats stats =
env.getTransactionStats(TestUtils.FAST_STATS);
assertEquals(0, stats.getNAborts());
int initialCommits = 2; // 2 commits for adding UP database
assertEquals(initialCommits, stats.getNCommits());
int numKeys = 7;
createDbs();
// Insert data with autocommit
dbInsertData(0, numKeys, null);
verifyData(numKeys, 0);
// Insert data with a txn
Transaction txn = env.beginTransaction(null, null);
dbInsertData(numKeys, numKeys*2, txn);
txn.commit();
verifyData(numKeys*2, 0);
stats = env.getTransactionStats(TestUtils.FAST_STATS);
assertEquals(0, stats.getNAborts());
assertEquals((initialCommits + 1 + // 1 explicit commit above
(2 * NUM_DBS) + // 2 per create/open
(numKeys*NUM_DBS)), // 1 per record, using autotxn
stats.getNCommits());
// delete data with a txn, abort
txn = env.beginTransaction(null, null);
dbDeleteData(numKeys, numKeys * 2, txn);
verifyData(numKeys, 0); // verify w/dirty read