#NEWLINE# def testNoJournalEntriesAreAddedWhenJournalingIsDisabled( self ) : #NEWLINE# #INDENT# with test_lib . ConfigOverrider ( { #NEWLINE# #INDENT# 'Worker.enable_packed_versioned_collection_journaling' : False , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# with aff4 . FACTORY . Create ( self . collection_urn , 'PackedVersionedCollection' , mode = 'w' , token = self . token ) as fd : #NEWLINE# #INDENT# fd . Add ( rdf_flows . GrrMessage ( request_id = 42 ) ) #NEWLINE# fd . AddAll ( [ rdf_flows . GrrMessage ( request_id = 43 ) , rdf_flows . GrrMessage ( request_id = 44 ) ] ) #NEWLINE# #UNINDENT# aff4 . PackedVersionedCollection . AddToCollection ( self . collection_urn , [ rdf_flows . GrrMessage ( request_id = 1 ) , rdf_flows . GrrMessage ( request_id = 2 ) ] , token = self . token ) #NEWLINE# with aff4 . FACTORY . OpenWithLock ( self . collection_urn , token = self . token ) as fd : #NEWLINE# #INDENT# fd . Compact ( ) #NEWLINE# #UNINDENT# fd = aff4 . FACTORY . Open ( self . collection_urn , age = aff4 . ALL_TIMES , token = fd . token ) #NEWLINE# self . assertFalse ( fd . IsAttributeSet ( fd . Schema . ADDITION_JOURNAL ) ) #NEWLINE# self . assertFalse ( fd . IsAttributeSet ( fd . Schema . COMPACTION_JOURNAL ) )