org.apache.derbyTesting.functionTests.tests.upgradeTests
Class BasicSetup

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.derbyTesting.junit.BaseTestCase
              extended by org.apache.derbyTesting.junit.BaseJDBCTestCase
                  extended by org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeChange
                      extended by org.apache.derbyTesting.functionTests.tests.upgradeTests.BasicSetup
All Implemented Interfaces:
junit.framework.Test

public class BasicSetup
extends UpgradeChange

Basic fixtures and setup for the upgrade test, not tied to any specific release.


Field Summary
 
Fields inherited from class org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeChange
oldVersion, PH_CREATE, PH_HARD_UPGRADE, PH_POST_HARD_UPGRADE, PH_POST_SOFT_UPGRADE, PH_SOFT_UPGRADE, phase, PHASES, SQLSTATE_NEED_UPGRADE
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
BasicSetup(java.lang.String name)
           
 
Method Summary
 void noConnectionAfterHardUpgrade()
          Ensure that after hard upgrade (with the old version) we can no longer connect to the database.
static junit.framework.Test suite()
           
 void testCreateTable()
          Make sure table created in soft upgrade mode can be accessed after shutdown.
 void testDML()
          Test general DML.
 void testIndex()
          Test table with index can be read after shutdown DERBY-2931
 void testOldVersion()
          Simple test of the old version from the meta data.
 
Methods inherited from class org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeChange
getOldMajor, getOldMinor, getPhase, oldAtLeast, oldIs
 
Methods inherited from class org.apache.derbyTesting.junit.BaseJDBCTestCase
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertTableRowCount, assertUpdateCount, assertUpdateCount, checkAllConsistency, checkEstimatedRowCount, commit, createStatement, createStatement, createStatement, dropTable, dropTable, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbedded
 
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
 

Constructor Detail

BasicSetup

public BasicSetup(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()

testOldVersion

public void testOldVersion()
                    throws java.sql.SQLException
Simple test of the old version from the meta data.

Throws:
java.sql.SQLException

testDML

public void testDML()
             throws java.sql.SQLException
Test general DML. Just execute some INSERT/UPDATE/DELETE statements in all phases to see that generally the database works.

Throws:
java.sql.SQLException

testCreateTable

public void testCreateTable()
                     throws java.sql.SQLException
Make sure table created in soft upgrade mode can be accessed after shutdown. DERBY-2931

Throws:
java.sql.SQLException

testIndex

public void testIndex()
               throws java.sql.SQLException
Test table with index can be read after shutdown DERBY-2931

Throws:
java.sql.SQLException

noConnectionAfterHardUpgrade

public void noConnectionAfterHardUpgrade()
Ensure that after hard upgrade (with the old version) we can no longer connect to the database.


Built on Sat 2009-11-28 18:44:18-0800, from revision 885187

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.