directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1374723 - /directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
Date Sun, 19 Aug 2012 10:23:15 GMT
Author: gokturk
Date: Sun Aug 19 10:23:15 2012
New Revision: 1374723

URL: http://svn.apache.org/viewvc?rev=1374723&view=rev
Log:
* Fixed randomly emerged test failure:

 Test case is, along with issued transactions, wrapping TxnIndexCursor rather then some partition
backed index's IndexCursor. When issued transactions have been flushed to the MockPartition,
IndexxCursorWrapper can't see all the transactions and test's assumptions on iterations don't
stand anymore.
 
 Added setDoNotFlush() call to prevent transactions from disappearing from commitqueue.

Modified:
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java?rev=1374723&r1=1374722&r2=1374723&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
Sun Aug 19 10:23:15 2012
@@ -126,6 +126,8 @@ public class IndexCursorWrapperTest exte
             txnManager = txnManagerFactory.txnManagerInternalInstance();
             txnLogManager = txnManagerFactory.txnLogManagerInstance();
 
+            txnManager.setDoNotFlush();
+
             super.setup( dn );
 
             MockIndex mockIndex = new MockIndex( attributeOid );
@@ -159,9 +161,10 @@ public class IndexCursorWrapperTest exte
             IndexChange idxChange;
 
             // Begin a txn and do some index changes.
-            DataChangeContainer changeContainer = new DataChangeContainer( partition );
             txnManager.beginTransaction( false );
 
+            DataChangeContainer changeContainer = new DataChangeContainer( partition );
+
             // Add (5,5) missing in the original index 
             idxChange = new IndexChange( mockIndex, new Long( 5 ), getUUIDString( 5 ),
                 IndexChange.Type.ADD, true );



Mime
View raw message