|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.derbyTesting.junit.BaseTestCase
org.apache.derbyTesting.junit.BaseJDBCTestCase
org.apache.derbyTesting.functionTests.tests.memorydb.BasicInMemoryDbTest
public class BasicInMemoryDbTest
Basic tests of the in-memory db storage back end.
| Field Summary | |
|---|---|
private static MemoryDbManager |
dbm
Helper for dealing with memory databases. |
| Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE |
| Constructor Summary | |
|---|---|
BasicInMemoryDbTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getString(int length,
CharAlphabet alphabet)
Generates a string. |
static junit.framework.Test |
suite()
|
void |
tearDown()
Closes all opened statements and connections that are known, and also deletes all known in-memory databases. |
void |
testBootSameDbDifferentSubSubProtocol()
Verify that booting two databases with the same name but with different subsubprotocols doesn't result in two connections to the same database. |
void |
testCreateBackupBootRestore()
Performs a cycle to test that the in-memory db is compatible with the deafult directory protocol. |
void |
testDelete()
Test deletion of an in-memory database: - create database - delete database - try to connection to database, should fail - recreate and delete again |
void |
testDeleteWhenInUse()
Deletes the database when in use by a different connection. |
void |
testEnginehutdown()
Makes sure shutting down the Derby engine with an in-memory database already booted works. |
void |
testFunctionalityPresent()
Tries to connect to a non-existing database with the in-memory protocol, expecting an error saying the database doesn't exist. |
void |
testShutdown()
Makes sure shutting down an in-memory database works. |
void |
testShutdownWhenInUse()
Shuts down the database when in use by a different connection. |
| Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runTest, setName, setUp, 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 |
| Field Detail |
|---|
private static final MemoryDbManager dbm
| Constructor Detail |
|---|
public BasicInMemoryDbTest(java.lang.String name)
| Method Detail |
|---|
public void tearDown()
throws java.lang.Exception
tearDown in class BaseJDBCTestCasejava.lang.Exception - if something goes wrongpublic void testFunctionalityPresent()
public void testCreateBackupBootRestore()
throws java.io.IOException,
java.sql.SQLException
java.io.IOException - if something goes wrong
java.sql.SQLException - if something goes wrong
public void testShutdown()
throws java.sql.SQLException
java.sql.SQLException - if something goes wrong
public void testEnginehutdown()
throws java.sql.SQLException
Related to DERBY-4093
java.sql.SQLException - if something goes wrong
public void testBootSameDbDifferentSubSubProtocol()
throws java.sql.SQLException
java.sql.SQLException - if something goes wrong
public void testDelete()
throws java.sql.SQLException
java.sql.SQLException - if something else goes wrong
public void testDeleteWhenInUse()
throws java.io.IOException,
java.sql.SQLException
The expected outcome is that the first connection will be closed when the second one deletes the database.
java.io.IOException - if something goes wrong
java.sql.SQLException - if something goes wrong
public void testShutdownWhenInUse()
throws java.io.IOException,
java.sql.SQLException
The expected outcome is that the first connection will be closed when the second one shuts down the database.
java.io.IOException - if something goes wrong
java.sql.SQLException - if something goes wrongpublic static junit.framework.Test suite()
public static java.lang.String getString(int length,
CharAlphabet alphabet)
throws java.io.IOException
length - length of the stringalphabet - the alphabet to use for the content
java.io.IOException - if reading from the source stream fails
|
Built on Sat 2009-11-28 18:44:18-0800, from revision 885187 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||