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

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

public class Changes10_2
extends UpgradeChange

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


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
Changes10_2(java.lang.String name)
           
 
Method Summary
 void changeEncryptionFromEncryptedDatabase()
          Run the change encryption test against a encrypted database.
 void changeEncryptionFromNone()
          Run the change encryption test against a non-encrypted database.
private  void checkSystemSchemasOwner(java.lang.String name)
           
static junit.framework.Test suite()
           
 void testDatabaseOwnerChange()
          This method lists the schema names and authorization ids in SYS.SCHEMAS table.
 void testGrantRevokeStatements()
          Simple test of if GRANT/REVOKE statements are handled correctly in terms of being allowed in soft upgrade.
 void testReusableRecordIdSequenceNumber()
          In 10.2: We will write a ReusableRecordIdSequenceNumber in the header of a FileContaienr.
 void testSystemRoutinePermissions()
          This method checks that some system routines are granted public access after a full upgrade.
 void testTriggerInternalVTI()
          Triger (internal) VTI 10.2 - Check that a statement trigger created in 10.0 or 10.1 can be executed in 10.2 and that a statement trigger created in soft upgrade in 10.2 can be used in older releases.
 
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

Changes10_2

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

suite

public static junit.framework.Test suite()

testTriggerInternalVTI

public void testTriggerInternalVTI()
                            throws java.sql.SQLException
Triger (internal) VTI 10.2 - Check that a statement trigger created in 10.0 or 10.1 can be executed in 10.2 and that a statement trigger created in soft upgrade in 10.2 can be used in older releases. The VTI implementing statement triggers changed in 10.2 from implementations of ResultSet to implementations of PreparedStatement. See DERBY-438. The internal api for the re-written action statement remains the same. The re-compile of the trigger on version changes should automatically switch between the two implementations.

Throws:
java.sql.SQLException

testReusableRecordIdSequenceNumber

public void testReusableRecordIdSequenceNumber()
                                        throws java.sql.SQLException
In 10.2: We will write a ReusableRecordIdSequenceNumber in the header of a FileContaienr. Verify here that a 10.1 Database does not malfunction from this. 10.1 Databases should ignore the field.

Throws:
java.sql.SQLException

testGrantRevokeStatements

public void testGrantRevokeStatements()
                               throws java.sql.SQLException
Simple test of if GRANT/REVOKE statements are handled correctly in terms of being allowed in soft upgrade.

Throws:
java.sql.SQLException

testDatabaseOwnerChange

public void testDatabaseOwnerChange()
                             throws java.sql.SQLException
This method lists the schema names and authorization ids in SYS.SCHEMAS table. This is to test that the owner of system schemas is changed from pseudo user "DBA" to the user invoking upgrade.

Throws:
java.sql.SQLException

checkSystemSchemasOwner

private void checkSystemSchemasOwner(java.lang.String name)
                              throws java.sql.SQLException
Throws:
java.sql.SQLException

testSystemRoutinePermissions

public void testSystemRoutinePermissions()
                                  throws java.sql.SQLException
This method checks that some system routines are granted public access after a full upgrade.

Throws:
java.sql.SQLException

changeEncryptionFromNone

public void changeEncryptionFromNone()
                              throws java.sql.SQLException
Run the change encryption test against a non-encrypted database. Test that changing the encryption is only allowed if the database has been hard-upgraded. This test assumes it has its own single use database, which will not be booted by the general upgrade test setup.

Throws:
java.sql.SQLException

changeEncryptionFromEncryptedDatabase

public void changeEncryptionFromEncryptedDatabase()
                                           throws java.sql.SQLException
Run the change encryption test against a encrypted database. Test that changing the encryption is only allowed if the database has been hard-upgraded. This test assumes it has its own single use database, which will not be booted by the general upgrade test setup.

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.