Java Doc for T_b2i.java in  » Database-DBMS » db-derby-10.2 » org » apache » derbyTesting » unitTests » store » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derbyTesting.unitTests.store 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derbyTesting.unitTests.harness.T_MultiIterations
   org.apache.derbyTesting.unitTests.store.T_b2i

T_b2i
public class T_b2i extends T_MultiIterations (Code)




Method Summary
 voidcreateCongloms(TransactionController tc, int num_cols, boolean unique, boolean varying_first_col, int max_btreerows_per_page, T_CreateConglomRet ret_val)
     Utility routine to create base table for tests.

A little utility routine to create base tables for tests.

protected static  PropertiescreateProperties(Properties input_properties, boolean input_allowduplicates, int input_nkeyfields, int input_nuniquecolumns, boolean input_maintainparentlinks, long input_baseconglomerateid, int input_rowlocationcolumn)
    
public  StringgetModuleToTestProtocolName()
    
public static  StringrepeatString(String data, int repeat)
    
protected  voidrunTestSet()
     Driver routine for the btree secondary index tests.
protected  voidsetupTest()
     Routine one once per invocation of the test by the driver.
protected  booleant_001(TransactionController tc)
     Test BTreeController.insert()

Just verify that insert code works for a secondary index.

protected  booleant_002(TransactionController tc)
     Test backout during critical times of splits.
protected  booleant_003(TransactionController tc)
     Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(), BtreeScan.fetch().
protected  booleant_004(TransactionController tc)
     Test qualifiers.
protected  booleant_005(TransactionController tc)
     Test Branch splits - number of rows necessary to cause splits is raw store implementation dependant (currently 5 rows per page in in-memory implementation).
protected  booleant_006(TransactionController tc)
     Test unimplemented interfaces.
protected  booleant_007(TransactionController tc)
    
protected  booleant_008(TransactionController tc)
    
protected  booleant_009(TransactionController tc)
     Test unique/nonunique indexes - both positive and negative cases.
protected  booleant_010(TransactionController tc)
    
protected  booleant_011(TransactionController tc)
     Test Special cases of split.
protected  booleant_012(TransactionController tc)
     Test Special cases of split.
protected  booleant_013(TransactionController tc)
     Test backout during critical times of splits.

Force logical undo of an operation which generated an internal update of a btree record: case 1: o insert into unique btree key1, rowlocation_1 o delete from btree key1, rowlocation_1 - this will mark the record logically deleted. o insert enough records to move the logically deleted row to another page to exercise logical undo of the delete. o insert into btree key1, rowlocation_2 - this internally will generate a logical update field on the record. o insert enough records to move the logically deleted row to another page to exercise logical undo of the delete. o abort. case 2: o same as case 1 but don't change the rowlocation_1 value.

protected  booleant_014(TransactionController tc)
     Test getTableProperties() of BTreeController.
protected  booleant_015(TransactionController tc)
     Test latch release during critical time during row level locking.
protected  booleant_016(TransactionController tc)
     Test deadlocks during critical times of row level locking.
protected  booleant_017(TransactionController tc)
     Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(), BtreeScan.fetch() with descending indexes.
protected  booleant_018(TransactionController tc)
     Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(), BtreeScan.fetch() with alternating ascending and descending coulmn sort order indexes.
protected  booleant_019(TransactionController tc)
     Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(), BtreeScan.fetch() with alternating ascending and descending coulmn sort order indexes.
protected  booleant_020(TransactionController tc)
     Test read uncommitted cases on scan.
protected  booleant_delete(TransactionController tc, long conglomid, DataValueDescriptor[] search_key, DataValueDescriptor[] template)
     delete a single key, given key value.
protected  booleant_perf(TransactionController tc)
    
protected  booleant_scan(TransactionController tc, long conglomid, DataValueDescriptor[] template, DataValueDescriptor[] start_key, int start_op, Qualifier qualifier, DataValueDescriptor[] stop_key, int stop_op, int expect_numrows, int expect_key)
     Test a single scan.



Method Detail
createCongloms
void createCongloms(TransactionController tc, int num_cols, boolean unique, boolean varying_first_col, int max_btreerows_per_page, T_CreateConglomRet ret_val) throws StandardException(Code)
Utility routine to create base table for tests.

A little utility routine to create base tables for tests. Just here to make tests a little more readable. It currently just creates a heap table with "num_cols" SQLLongint columns. The identifier to be used to open the conglomerate later.
Parameters:
  num_cols - the number of columns in the base table.
exception:
  StandardException - Standard exception policy.




createProperties
protected static Properties createProperties(Properties input_properties, boolean input_allowduplicates, int input_nkeyfields, int input_nuniquecolumns, boolean input_maintainparentlinks, long input_baseconglomerateid, int input_rowlocationcolumn) throws StandardException(Code)



getModuleToTestProtocolName
public String getModuleToTestProtocolName()(Code)



repeatString
public static String repeatString(String data, int repeat)(Code)



runTestSet
protected void runTestSet() throws T_Fail(Code)
Driver routine for the btree secondary index tests.


exception:
  T_Fail - Throws T_Fail on any test failure.




setupTest
protected void setupTest() throws T_Fail(Code)
Routine one once per invocation of the test by the driver.

Do work that should only be done once, no matter how many times runTests() may be executed.
exception:
  T_Fail - Thrown on any error.




t_001
protected boolean t_001(TransactionController tc) throws StandardException, T_Fail(Code)
Test BTreeController.insert()

Just verify that insert code works for a secondary index. Just call the interface and make sure the row got there.
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_002
protected boolean t_002(TransactionController tc) throws StandardException, T_Fail(Code)
Test backout during critical times of splits.

Use trace points to force errors in split at critical points: leaf_split_abort{1,2,3,4}
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_003
protected boolean t_003(TransactionController tc) throws StandardException, T_Fail(Code)
Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(), BtreeScan.fetch().
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_004
protected boolean t_004(TransactionController tc) throws StandardException, T_Fail(Code)
Test qualifiers.
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_005
protected boolean t_005(TransactionController tc) throws StandardException, T_Fail(Code)
Test Branch splits - number of rows necessary to cause splits is raw store implementation dependant (currently 5 rows per page in in-memory implementation).
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_006
protected boolean t_006(TransactionController tc) throws StandardException, T_Fail(Code)
Test unimplemented interfaces. The following ScanController interfaces are not supported by the btree implementation, because row locations are not returned outside the interface. At some point we may package a key as a row location but that does not really give any more functionality than using scan to find your key: ScanController.fetchLocation() ScanController.newRowLocationTemplate() ScanController.replace() ConglomerateController.delete() ConglomerateController.fetch() ConglomerateController.insertAndFetchLocation() ConglomerateController.newRowLocationTemplate() ConglomerateController.replace()
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_007
protected boolean t_007(TransactionController tc) throws StandardException, T_Fail(Code)
Test multiple scans in a single page/no split
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_008
protected boolean t_008(TransactionController tc) throws StandardException, T_Fail(Code)
Test multiple scans in a single table/with splits
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_009
protected boolean t_009(TransactionController tc) throws StandardException, T_Fail(Code)
Test unique/nonunique indexes - both positive and negative cases.


exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_010
protected boolean t_010(TransactionController tc) throws StandardException, T_Fail(Code)
Test restoreToNull
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_011
protected boolean t_011(TransactionController tc) throws StandardException, T_Fail(Code)
Test Special cases of split.

Testing: restartSplitFor() call in LeafControlRow(). The first case is where we split down the tree and reach the leaf, pick a split point, and then find that there is not enough room to insert row into parent branch page. The second case is the same as the first except the calling code is trying to split a branch page and the parent branch page doesn't have room for the row.
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_012
protected boolean t_012(TransactionController tc) throws StandardException, T_Fail(Code)
Test Special cases of split.

Testing: restartSplitFor() call in BranchControlRow(). The second case is the same as the first except the calling code is trying to split a branch page and the parent branch page doesn't have room for the row.
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_013
protected boolean t_013(TransactionController tc) throws StandardException, T_Fail(Code)
Test backout during critical times of splits.

Force logical undo of an operation which generated an internal update of a btree record: case 1: o insert into unique btree key1, rowlocation_1 o delete from btree key1, rowlocation_1 - this will mark the record logically deleted. o insert enough records to move the logically deleted row to another page to exercise logical undo of the delete. o insert into btree key1, rowlocation_2 - this internally will generate a logical update field on the record. o insert enough records to move the logically deleted row to another page to exercise logical undo of the delete. o abort. case 2: o same as case 1 but don't change the rowlocation_1 value. This simulates what the language will generate on an update of a key field.
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_014
protected boolean t_014(TransactionController tc) throws StandardException, T_Fail(Code)
Test getTableProperties() of BTreeController.


exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_015
protected boolean t_015(TransactionController tc) throws StandardException, T_Fail(Code)
Test latch release during critical time during row level locking.

Use trace points to force errors in split at critical points: leaf_split_abort{1,2,3,4}
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_016
protected boolean t_016(TransactionController tc) throws StandardException, T_Fail(Code)
Test deadlocks during critical times of row level locking.

Use trace points to force errors in split at critical points: leaf_split_abort{1,2,3,4}
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_017
protected boolean t_017(TransactionController tc) throws StandardException, T_Fail(Code)
Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(), BtreeScan.fetch() with descending indexes.
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_018
protected boolean t_018(TransactionController tc) throws StandardException, T_Fail(Code)
Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(), BtreeScan.fetch() with alternating ascending and descending coulmn sort order indexes.
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_019
protected boolean t_019(TransactionController tc) throws StandardException, T_Fail(Code)
Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(), BtreeScan.fetch() with alternating ascending and descending coulmn sort order indexes.
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_020
protected boolean t_020(TransactionController tc) throws StandardException, T_Fail(Code)
Test read uncommitted cases on scan.


exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.




t_delete
protected boolean t_delete(TransactionController tc, long conglomid, DataValueDescriptor[] search_key, DataValueDescriptor[] template) throws StandardException(Code)
delete a single key, given key value. assumes 3 column table, first column = 1, second column is a unique key, and 3rd column is a RecordHandle into the base table.
exception:
  StandardException - Standard exception policy.



t_perf
protected boolean t_perf(TransactionController tc) throws StandardException, T_Fail(Code)
Test simple btree insert performance
exception:
  StandardException - Standard exception policy.
exception:
  T_Fail - Throws T_Fail on any test failure.



t_scan
protected boolean t_scan(TransactionController tc, long conglomid, DataValueDescriptor[] template, DataValueDescriptor[] start_key, int start_op, Qualifier qualifier, DataValueDescriptor[] stop_key, int stop_op, int expect_numrows, int expect_key) throws StandardException(Code)
Test a single scan.
exception:
  StandardException - Standard exception policy.



Methods inherited from org.apache.derbyTesting.unitTests.harness.T_MultiIterations
abstract protected void runTestSet() throws T_Fail(Code)(Java Doc)
protected void runTests() throws T_Fail(Code)(Java Doc)
abstract protected void setupTest() throws T_Fail(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.