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

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.Changes10_3
All Implemented Interfaces:
junit.framework.Test

public class Changes10_3
extends UpgradeChange

Upgrade test cases for changes made in 10.3. If the old version is 10.3 or later then these tests will not be run.
10.3 Upgrade issues


Field Summary
private static java.lang.String UNKNOWN_PROCEDURE
           
 
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
Changes10_3(java.lang.String name)
           
 
Method Summary
private  void assertPolicyReloaderDoesNotExist()
          Verify whether the policy-reloading procedure exists.
private  void assertPolicyReloaderExists()
          Verify that the policy-reloading procedure exists.
private  void checkDataToCase606(int start_value, int end_value)
           
private  void checkNewHeap(java.lang.String tableName, java.lang.String value)
          Check if we can open the heap.
static junit.framework.Test suite(int phase)
          Return the suite of tests to test the changes made in 10.3.
 void testCompilationSchema()
          Verify the compilation schema is nullable after upgrade to 10.3 or later.
 void testImportExportLobsProcedures()
          Simple test to ensure new import/export procedures added in 10.3 are working on hard upgrade to 10.3 from previous derby versions.
 void testNegValueSupportedLogRecord()
          In 10.3: We will write a LogRecord with a different format that can also write negative values.
 void testNewHeap()
          Test that new format id for Heap is not used in soft upgrade.
 void testPolicyReloadingProcedure()
          Ensure that the new policy-file-reloading procedure works after hard upgrade to 10.3 from previous derby versions.
private  void tryReloading(boolean shouldSucceed, java.lang.String expectedSQLState)
          Call the policy reloading procedure.
 
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
 

Field Detail

UNKNOWN_PROCEDURE

private static final java.lang.String UNKNOWN_PROCEDURE
See Also:
Constant Field Values
Constructor Detail

Changes10_3

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

suite

public static junit.framework.Test suite(int phase)
Return the suite of tests to test the changes made in 10.3.

Parameters:
phase - an integer that indicates the current phase in the upgrade test.
Returns:
the test suite created.

testCompilationSchema

public void testCompilationSchema()
                           throws java.sql.SQLException
Verify the compilation schema is nullable after upgrade to 10.3 or later. (See DERBY-630)

Throws:
java.sql.SQLException

testNegValueSupportedLogRecord

public void testNegValueSupportedLogRecord()
                                    throws java.sql.SQLException
In 10.3: We will write a LogRecord with a different format that can also write negative values. Verify here that a 10.2 Database does not malfunction from this and 10.2 Databases will work with the old LogRecord format.

Throws:
java.sql.SQLException

checkDataToCase606

private void checkDataToCase606(int start_value,
                                int end_value)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

testImportExportLobsProcedures

public void testImportExportLobsProcedures()
                                    throws java.sql.SQLException
Simple test to ensure new import/export procedures added in 10.3 are working on hard upgrade to 10.3 from previous derby versions.

Throws:
java.sql.SQLException

testPolicyReloadingProcedure

public void testPolicyReloadingProcedure()
                                  throws java.sql.SQLException
Ensure that the new policy-file-reloading procedure works after hard upgrade to 10.3 from previous derby versions.

Throws:
java.sql.SQLException

assertPolicyReloaderExists

private void assertPolicyReloaderExists()
                                 throws java.sql.SQLException
Verify that the policy-reloading procedure exists.

Throws:
java.sql.SQLException

assertPolicyReloaderDoesNotExist

private void assertPolicyReloaderDoesNotExist()
                                       throws java.sql.SQLException
Verify whether the policy-reloading procedure exists.

Throws:
java.sql.SQLException

tryReloading

private void tryReloading(boolean shouldSucceed,
                          java.lang.String expectedSQLState)
                   throws java.sql.SQLException
Call the policy reloading procedure.

Throws:
java.sql.SQLException

checkNewHeap

private void checkNewHeap(java.lang.String tableName,
                          java.lang.String value)
                   throws java.sql.SQLException
Check if we can open the heap.

This test just does a simple select to verify that 10.3 heap conglomerate format id's are working right for all the various upgrade scenarios.

Throws:
java.sql.SQLException

testNewHeap

public void testNewHeap()
                 throws java.sql.SQLException
Test that new format id for Heap is not used in soft upgrade.

Throws:
java.sql.SQLException

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.