Exemple #1
0
        private void WithLogManager(TimeSpan retention, Action <OperationContext, RocksDbLogsManager> action)
        {
            var backupFolder = _workingDirectory.Path / "backup";

            _fileSystem.CreateDirectory(backupFolder);
            Assert.True(_fileSystem.DirectoryExists(backupFolder));

            var tracingContext   = new Context(TestGlobal.Logger);
            var operationContext = new OperationContext(tracingContext);

            var manager = new RocksDbLogsManager(_clock, _fileSystem, backupFolder, retention);

            action(operationContext, manager);
        }
 private static async Task <AbsolutePath> BackupAsync(RocksDbLogsManager manager, OperationContext context, AbsolutePath instanceFolder)
 {
     return((await manager.BackupAsync(context, instanceFolder)).ShouldBeSuccess().Value !);
 }