| Home >> All >> org >> apache >> derbyTesting |
| | org.apache.derbyTesting.functionTests.* (192) | | org.apache.derbyTesting.unitTests.* (64) |
| | org.apache.derbyTesting.upgradeTests.* (1) |
Package Samples:
org.apache.derbyTesting.functionTests.harness
org.apache.derbyTesting.functionTests.tests.demo
org.apache.derbyTesting.functionTests.tests.derbynet
org.apache.derbyTesting.functionTests.tests.i18n
org.apache.derbyTesting.functionTests.tests.jdbcapi
org.apache.derbyTesting.functionTests.tests.lang
org.apache.derbyTesting.functionTests.tests.largedata
org.apache.derbyTesting.functionTests.tests.store
org.apache.derbyTesting.functionTests.tests.tools
org.apache.derbyTesting.functionTests.util.StaticInitializers
org.apache.derbyTesting.functionTests.util.corruptio
org.apache.derbyTesting.functionTests.util
org.apache.derbyTesting.unitTests.crypto
org.apache.derbyTesting.unitTests.harness
org.apache.derbyTesting.unitTests.lang
org.apache.derbyTesting.unitTests.services
org.apache.derbyTesting.unitTests.store
org.apache.derbyTesting.unitTests.util
org.apache.derbyTesting.upgradeTests
Classes:
T_RecoverBadLog: A implementation unit test for recovering log that has been damanged but salvagable. To run, create a derby.properties file in a new directory with the contents derby.module.test.recoverBadLog=org.apache.derbyTesting.unitTests.store.T_RecoverBadLog Execute in order To Test Bad Log due to partial write that are identified by checking the length in the beginning and end of the log record. java -DTestBadLogSetup=true org.apache.derbyTesting.unitTests.harness.UnitTestMain java -DTestBadLog1=true org.apache.derbyTesting.unitTests.harness.UnitTestMain java -DTestBadLog2=true org.apache.derbyTesting.unitTests.harness.UnitTestMain ...
phaseTester: Tests upgrades including soft upgrade. Test is broken into phases, by running this main java program separately each time, with either the old release or the new release in the class path and the indication of the phase. The phases are: Create database with the old release. Boot the database with the new release in soft upgrade mode. Try to execute functionality that is not allowed in soft upgrade. Boot the database with the old release to ensure the database can be booted by the old release after soft upgrade. Boot the database with the new release in hard upgrade mode, specifying the upgrade=true ...
jvm: This class provides the interface and mechanism for plugging VMs into the system. Typically you only need to add a new implementation if your supported attributes or command line building are different from those that exist. this class has fields for all options that a JDK VM can take, that is the reference point for all others. Note some VMs (like jview) don't take all options and will ignore them (like -mx). Defining the system property "verbose" to 1 will give you warnings for ignored properties in a properly implemented subclass. here is the canonical output from java -help for options we take: ...
T_SecondaryIndexRow: This class implements a row which will be stored in a secondary index on a heap table. This class creates a new DataValueDescriptor array which will be the row used to insert into the secondary index. The fields of this object array are made up of references to DataValueDescriptors provided by the caller: the DataValueDescriptors in the template and a RowLocation. The interface is designed to support the standard access method interface where callers provide a single template and then read rows into that template over and over. This class keeps a reference to the objects in the template and the ...
TestDurabilityProperty: This program tests the system when the derby.system.durability property is set to 'test'. When the derby.system.durability is set to 'test', the system will not do any sync to the disk and the recovery system will not work property. It is provided for performance reasons and should ideally only be used when there is no requirement for the database to recover. When set, the system will not do any syncs, the cases namely - no sync of the log file at each commit - no sync of the log file before data page is forced to disk - no sync of page allocation when file is grown - no sync of data writes during ...
CorruptDiskStorageFactory: This class provides proxy implementation of the StorageFactory interface for testing. Storage Factory is used by the database engine to access persistent data and transaction logs. By default all the method calls delegate the work to the real disk storage factory (org.apache.derby.impl.io.DirStorageFactory) based on the classes in the java.io packgs. In some cases this factory instruments some methods to corrupt the io to simulate disk corruptions for testing. For example to simulate out of order partial writes to disk before the crash. Derby by default uses the storage factory implementation in ...
BitUtil: This class provides utility methods for converting byte arrays to hexidecimal Strings and manipulating BIT/BIT VARYING values as a packed vector of booleans. The BIT/BIT VARYING methods are modeled after some methods in the java.util.BitSet class. An alternative to using a SQL BIT (VARYING) column in conjunction with the methods provided herein to provide bit manipulation would be to use a serialized java.util.BitSet column instead. This class contains the following static methods: void set (byte[] bytes, int position) to set a bit void clear (byte[] bytes, int position) to clear a bit boolean ...
streams: This tests streams, and when we should not materialize it. Beetle entry 4896, 4955. Some of the code comes from conn/largeStreams.java. But this program figures out whether a stream is materialized or not in a different way. Part of the reason is that this test should be run nightly to catch regressions and shouldn't require too much disk space. It figures out whether a stream is materialized or not by comparing the stack levels of different cases. The stack level is when reading the last byte of the stream. According to the current code, the stack is about 10 levels deeper when reading the stream ...
odbc_metadata: Test of database metadata for ODBC clients. This test does everything that is done in "metadata.java" (which this class extends), except that it makes the metadata calls in such a way as to retrieve ODBC-compliant result sets. Unlike metadata.java, this test also does a (simple) check of the metadata result sets to see if they comply with the standards--in this case, with the ODBC 3.0 standard as defined at this URL: http://msdn.microsoft.com/library/default.asp?url=/library/ en-us/odbc/htm/odbcsqlprocedurecolumns.asp The ODBC standards verification involves checking the following for each column ...
lobLengthTests: This test is part of the "largedata" suite because the use of very large LOBs can require extra memory for the server JVM. If this test was run as part of the normal 'derbyall' suite, it would require that any developer running the derbyall suite have a machine with a good deal of memory. And since _every_ developer is encouraged to run 'derbyall' before submitting any patches, that would mean that _every_ developer would need a machine with lots of memory--and that's something we do NOT want to require. The specific JVM memory requirements for this test are set in the properties file for this ...
declareGlobalTempTableJavaJDBC30: Test for declared global temporary tables (introduced in Cloudscape 5.2) and pooled connection close and jdbc 3.0 specific features The jdbc3.0 specific featuers are holdable cursors, savepoints. The rest of the temp table test are in declareGlobalTempTableJava class. The reason for a different test class is that the holdability and savepoint support is under jdk14 and higher. But we want to be able to run the non-holdable tests under all the jdks we support and hence splitting the tests into two separate tests. Also, the reason for pooled connection close is because DRDA doesn't yet have support ...
timestampArith: Test the JDBC TIMESTAMPADD and TIMESTAMPDIFF escape functions. Things to test: + Test each interval type with timestamp, date, and time inputs. + Test diff with all 9 combinations of datetime input types (timestamp - timestamp, timestamp - date, etc). + Test PreparedStatements with parameters, '?', in each argument, and Statements. (Statements are prepared internally so we do not also have to test PrepardStatements without parameters). + Test with null inputs. + Test with input string that is convertible to timestamp. + Test with invalid interval type. + Test with invalid arguments in the date ...
T_RecoverFullLog: A implementation unit test for log full condition To run, create a derby.properties file in a new directory with the contents derby.module.test.recoverFullLog=org.apache.derbyTesting.unitTests.store.T_RecoverFullLog Execute in order java -DTestFillLog=true org.apache.derbyTesting.unitTests.harness.UnitTestMain java -DTestLogSwitchFail=true org.apache.derbyTesting.unitTests.harness.UnitTestMain java -DTestFullRecoveryFail=true org.apache.derbyTesting.unitTests.harness.UnitTestMain (run this serveral times, this simulate recovery running out of log) java -DTestFullRecover=true org.apache.derbyTesting ...
importExport: This tests import and export utilties. It first creates a temp table T1 and inserts data into it. Then it calls export to export data out from it into a temp file. Then it calls import to read data from the temp file just created. The program goes through the resultset of import and inserts one row at a time into another temp table T2 which has same number of columns as T1. Then it compares number of rows in T1 and T2. If the number of rows are same as in T1 then part of the test succedded. The second part imports data out from T2 into second temp file and then we compare both the temp files to ...
xmlBinding: This class checks to make sure that the XML data type and the corresponding XML operations all work as expected from the JDBC side of things. In particular, this test verifies that 1) it is NOT possible to bind to/from an XML datatype (because the JDBC specification doesn't indicate how that should be done), and 2) the correct behavior occurs when null values (both Java and SQL) are bound into the bindable parameters for the XML operators. This file also checks that insertion from XML files via a character stream works, which is important since XML files can be arbitrarily long and thus stream-based ...
deadlockMode: This tests for deadlock which can occur if two threads get a row lock before getting a table lock on the same table. This can happen if the lock obtained by the insert, update or delete result set is a smaller range than the table scan result set. The insert, update or delete result set lock is obtained first. For example, if the insert, update or delete result set obtain a row lock and then the table scan obtains a table scan lock, deadlock can occur since two threads can obtain the row lock and then both thread will want the same table lock.
T_MultiThreadedIterations: Abstract class which executes T_MultiIterations. This allows multiple threads running T_MultiIterations. This allows the setup to be performed once, and then the test itself to be run with multiple threads for a number of iterations. The number of threads and iterations are set by the property derby.unittests.numThreads and derby.unittests.iterations and default to 1. Statistics are provided about each iteration in the error log. The statistics are time for each iteration, used and total memory changes per iteration.
MultiTest: MultiTest is a multiuser test harness. It runs multiple threads with differing scripts against an embedded server. For syntax see grammar.jj Tests are ended as soon as an unexpected error has occurred or after the specified test duration has transpired. The main loop ends by explicitly quitting (i.e. doing a System.exit()). Deprecated APIs: this test uses AppStreamWriter instead of the preferred AppStreamWriter. This is because utilMain() uses AppStreamWriter (deliberately, i think) so since that is called from this, there you have it.
T_MultiIterations: Abstract class which executes T_Generic. This splits the running of a test into two parts, the test setup and running the test. This allows the setup to be performed once, and then the test itself to be run for a number of iterations. The number iterations is set by the property derby.unittests.iterations and defaults to 1. Statistics are provided about each iteration in the error log. The statistics are time for each iteration, used and total memory changes per iteration.
T_Key: Key for these objects is an array of objects value - Integer or String - implies what object should be used in the cache. waitms - time to wait in ms on a set or create (simulates the object being loaded into the cache). canFind - true of the object can be found on a set, false if it can't. (simulates a request for a non-existent object) raiseException - true if an exception should be raised during set or create identity
CorruptBaseStorageFactory: This class provides a proxy base implementation of the WritableStorageFactory interface to instrument I/O operations for testing purposes. Some methods in this class adds support for corrupting the I/O operation sent by the engine before invoking the real storage factory underneath. By deault all the calls will go to the real storage factory defined by the concrete class, unless corruption is enabled through CorruptibleIo instance.
MarkedLimitInputStream: An input stream whose internal data is in blocks, the format of each block is (boolean isLastBlock, int blockLength, sequence of blockLength bytes) All blocks except for the last block must have isLastBlock set to false. The last block must have isLastBlock set to true. This class implements an input stream whose length is limited, yet the creator (writer) of the stream does not need to know the entire length before creating it.
DerbyNetAutoStart: Test the network server derby.drda.startNetworkServer property. Test that: The network server is started when the property value is true. The network server is not started when the property value is false. The default port number is used when the port property is not specified. The server uses a non-default port when a port property is set. A message is printed to derby.log when the server is already started.
CorruptRandomAccessFile: This class provides a proxy implementation of the StorageRandomAccess File interface. It is used by CorruptDiskStorageFactory to instrument the database engine i/o for testing puproses. How the i/o operation are corrupted is based on the values set in the instance of the Singleton CorruptibleIo class by the tests. Methods in this class functon similar to java.io.RandomAccessFile except when modified to perform the corruptios.
declareGlobalTempTableJava: Test for declared global temporary tables introduced in Cloudscape 5.2 The temp table tests with holdable cursor and savepoints are in declareGlobalTempTableJavaJDBC30 class. The reason for a different test class is that the holdability and savepoint support is under jdk14 and higher. But we want to be able to run the non-jdk14 specific tests under all the jdks we support and hence splitting the tests into 2 different classes
| Home | Contact Us | Privacy Policy | Terms of Service |