directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: svn commit: r1195129 - /directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java
Date Sun, 30 Oct 2011 09:32:56 GMT
On 10/30/11 8:55 AM, saya@apache.org wrote:
> Author: saya
> Date: Sun Oct 30 07:55:56 2011
> New Revision: 1195129
>
> URL: http://svn.apache.org/viewvc?rev=1195129&view=rev
> Log:
> invalid log issue is fixed.

This fix the test, not the problem. If someone decides to log and flush 
immediately, the test fails, although all the records are supposed to 
have been correctly flushed on disk.

IMO, we should not have to sync everything.
>
> Modified:
>      directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java
>
> Modified: directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java
> URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java?rev=1195129&r1=1195128&r2=1195129&view=diff
> ==============================================================================
> --- directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java
(original)
> +++ directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java
Sun Oct 30 07:55:56 2011
> @@ -77,9 +77,12 @@ public class LogTest
>                   Arrays.fill( recordData, (byte )i );
>
>                   userLogRecord.setData( recordData, dataLength );
> -                log.log( userLogRecord, true );
> +                log.log( userLogRecord, false );
>               }
>
> +            // Sync everything
> +            log.sync( LogAnchor.UNKNOWN_LSN );
> +
>               LogScanner logScanner = log.beginScan( startingLogAnchor );
>               int recordNumber = 0;
>
> @@ -96,8 +99,7 @@ public class LogTest
>                   recordNumber++;
>               }
>
> -            // Here, the expected number of record read should be 10, not 8...
> -            // assertEquals( 10, recordNumber );
> +            // Here, the expected number of record read should be 10
>               assertEquals( 10, recordNumber );
>           }
>           catch( IOException e )
>
>
>


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com


Mime
View raw message