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

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

public class Changes10_5
extends UpgradeChange

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


Field Summary
private static java.lang.String BAD_SYNTAX
           
 
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_5(java.lang.String name)
           
 
Method Summary
private  void possibleError(java.lang.String sqlstate, java.lang.String text)
           Run a statement.
static junit.framework.Test suite(int phase)
          Return the suite of tests to test the changes made in 10.5.
 void testDeterminismKeyword()
          Test that the DETERMINISTIC keyword is not allowed until you hard-upgrade to 10.5.
 void testGenerationClauses()
          Test that generation clauses are not allowed until you hard-upgrade to 10.5.
 void testSQLRoles()
          Check that when hard-upgraded to 10.5 or later SQL roles can be declared if DB has sqlAuthorization.
 void testSQLRolesBasic()
          Check that you must be hard-upgraded to 10.5 or later in order to use SQL roles
 void testUpdateStatisticsProcdure()
          Make sure that SYSCS_UTIL.SYSCS_UPDATE_STATISTICS can only be run in Derby 10.5 and higher.
 
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

BAD_SYNTAX

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

Changes10_5

public Changes10_5(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.5.

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

testUpdateStatisticsProcdure

public void testUpdateStatisticsProcdure()
                                  throws java.sql.SQLException
Make sure that SYSCS_UTIL.SYSCS_UPDATE_STATISTICS can only be run in Derby 10.5 and higher. DERBY-269 Test added for 10.5.

Throws:
java.sql.SQLException

testDeterminismKeyword

public void testDeterminismKeyword()
                            throws java.sql.SQLException
Test that the DETERMINISTIC keyword is not allowed until you hard-upgrade to 10.5.

Throws:
java.sql.SQLException

testGenerationClauses

public void testGenerationClauses()
                           throws java.sql.SQLException
Test that generation clauses are not allowed until you hard-upgrade to 10.5.

Throws:
java.sql.SQLException

possibleError

private void possibleError(java.lang.String sqlstate,
                           java.lang.String text)
                    throws java.sql.SQLException

Run a statement. If the sqlstate is not null, then we expect that error.

Throws:
java.sql.SQLException

testSQLRolesBasic

public void testSQLRolesBasic()
                       throws java.sql.SQLException
Check that you must be hard-upgraded to 10.5 or later in order to use SQL roles

Throws:
java.sql.SQLException

testSQLRoles

public void testSQLRoles()
                  throws java.sql.SQLException
Check that when hard-upgraded to 10.5 or later SQL roles can be declared if DB has sqlAuthorization.

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.