#NEWLINE# def testSecondConsecutiveRunDoesNothing( self ) : #NEWLINE# #INDENT# with aff4 . FACTORY . Create ( 'aff4:/tmp/coll' , 'PackedVersionedCollection' , mode = 'w' , token = self . token ) as fd : #NEWLINE# #INDENT# fd . Add ( rdf_flows . GrrMessage ( request_id = 1 ) ) #NEWLINE# #UNINDENT# fd = aff4 . FACTORY . Open ( 'aff4:/tmp/coll' , token = self . token ) #NEWLINE# self . assertEqual ( fd . Get ( fd . Schema . SIZE ) , 0 ) #NEWLINE# flow_urn = flow . GRRFlow . StartFlow ( flow_name = 'PackedVersionedCollectionCompactor' , sync = True , token = self . token ) #NEWLINE# flow_fd = aff4 . FACTORY . Open ( flow_urn , token = self . token ) #NEWLINE# self . assertTrue ( list ( ( l . log_message for l in flow_fd . GetLog ( ) if ( 'aff4:/tmp/coll' in l . log_message ) ) ) ) #NEWLINE# flow_urn = flow . GRRFlow . StartFlow ( flow_name = 'PackedVersionedCollectionCompactor' , sync = True , token = flow_urn . token ) #NEWLINE# flow_fd = aff4 . FACTORY . Open ( flow_urn , token = self . token ) #NEWLINE# self . assertFalse ( list ( ( l . log_message for l in flow_fd . GetLog ( ) if ( 'aff4:/tmp/coll' in l . log_message ) ) ) )