You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2008/02/04 15:37:30 UTC

svn commit: r618299 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java

Author: kahatlen
Date: Mon Feb  4 06:37:29 2008
New Revision: 618299

URL: http://svn.apache.org/viewvc?rev=618299&view=rev
Log:
DERBY-3371 (partial) Made T_AccessFactory.alterTable() run with both
temporary and non-temporary conglomerates to get better test coverage
in RAMTransaction

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java?rev=618299&r1=618298&r2=618299&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java Mon Feb  4 06:37:29 2008
@@ -144,7 +144,8 @@
 				&& insertAndUpdateExample(tc)
 				&& insertAndFetchExample(tc)
 				&& scanExample(tc)
-                && alterTable(tc)
+                && alterTable(tc, false)
+                && alterTable(tc, true)
 				&& tempTest(tc)
                 && getTableProperties(tc)
                 && insert_bench(tc)
@@ -1159,12 +1160,13 @@
 	 * @return true if the test succeeded.
      *
      * @param tc The transaction controller to use in the test.
+     * @param temporary flag which tells whether or not the conglomerate
+     * used in the test should be temporary
      *
 	 * @exception  StandardException  Standard exception policy.
 	 * @exception  T_Fail Unexpected behaviour from the API
      **/
-	protected boolean alterTable(
-    TransactionController tc)
+	private boolean alterTable(TransactionController tc, boolean temporary)
 		throws StandardException, T_Fail
 	{
         int key_value;
@@ -1173,6 +1175,9 @@
 
 		// Create a heap conglomerate.
         T_AccessRow template_row = new T_AccessRow(1);
+        int temporaryFlag = temporary ?
+            TransactionController.IS_TEMPORARY :
+            TransactionController.IS_DEFAULT;
 		long conglomid = 
             tc.createConglomerate(
                 "heap",       // create a heap conglomerate
@@ -1180,7 +1185,7 @@
 				null, 	// column sort order not required for heap
                 null, 	// default collation
                 null,         // default properties
-                TransactionController.IS_DEFAULT);       // not temporary
+                temporaryFlag);
 		// Open the conglomerate.
 		ConglomerateController cc =	
             tc.openConglomerate(