use of org.neo4j.com.storecopy.StoreCopyServer in project neo4j by neo4j.
the class BackupImplTest method flushStoreFilesWithCorrectCheckpointTriggerName.
@Test
public void flushStoreFilesWithCorrectCheckpointTriggerName() {
StoreCopyServer storeCopyServer = mock(StoreCopyServer.class);
when(storeCopyServer.flushStoresAndStreamStoreFiles(anyString(), any(StoreWriter.class), anyBoolean())).thenReturn(RequestContext.EMPTY);
BackupImpl backup = new BackupImpl(storeCopyServer, new Monitors(), mock(LogicalTransactionStore.class), mock(TransactionIdStore.class), mock(LogFileInformation.class), defaultStoreIdSupplier(), NullLogProvider.getInstance());
backup.fullBackup(mock(StoreWriter.class), false).close();
verify(storeCopyServer).flushStoresAndStreamStoreFiles(eq(BackupImpl.FULL_BACKUP_CHECKPOINT_TRIGGER), any(StoreWriter.class), eq(false));
}
Aggregations