@ -253,14 +253,16 @@ public class FileTreeIteratorTest extends RepositoryTestCase {
// Hopefully fsTick will make sure our entry gets smudged
// Hopefully fsTick will make sure our entry gets smudged
fsTick ( f ) ;
fsTick ( f ) ;
writeTrashFile ( "file" , "content" ) ;
writeTrashFile ( "file" , "content" ) ;
long lastModified = f . lastModified ( ) ;
git . add ( ) . addFilepattern ( "file" ) . call ( ) ;
git . add ( ) . addFilepattern ( "file" ) . call ( ) ;
writeTrashFile ( "file" , "conten2" ) ;
writeTrashFile ( "file" , "conten2" ) ;
f . setLastModified ( lastModified ) ;
DirCacheEntry dce = db . readDirCache ( ) . getEntry ( "file" ) ;
DirCacheEntry dce = db . readDirCache ( ) . getEntry ( "file" ) ;
FileTreeIterator fti = new FileTreeIterator ( trash , db . getFS ( ) , db
FileTreeIterator fti = new FileTreeIterator ( trash , db . getFS ( ) , db
. getConfig ( ) . get ( WorkingTreeOptions . KEY ) ) ;
. getConfig ( ) . get ( WorkingTreeOptions . KEY ) ) ;
while ( ! fti . getEntryPathString ( ) . equals ( "file" ) )
while ( ! fti . getEntryPathString ( ) . equals ( "file" ) )
fti . next ( 1 ) ;
fti . next ( 1 ) ;
// If the fsTick trick does not work we could skip the compareMetaData
// If the rounding trick does not work we could skip the compareMetaData
// test and hope that we are usually testing the intended code path.
// test and hope that we are usually testing the intended code path.
assertEquals ( MetadataDiff . SMUDGED , fti . compareMetadata ( dce ) ) ;
assertEquals ( MetadataDiff . SMUDGED , fti . compareMetadata ( dce ) ) ;
assertTrue ( fti . isModified ( dce , false ) ) ;
assertTrue ( fti . isModified ( dce , false ) ) ;