public void BackupRestore_A_Backup02StreamingTest() { if (GetServerVersion() < new Version("2.5.0.0")) { Assert.Inconclusive("Not supported on this version."); return; } FbStreamingBackup backupSvc = new FbStreamingBackup(); var backupLength = default(long); using (var ms = new MemoryStream()) { backupSvc.ConnectionString = BuildServicesConnectionString(); backupSvc.Options = FbBackupFlags.IgnoreLimbo; backupSvc.OutputStream = ms; backupSvc.ServiceOutput += new ServiceOutputEventHandler(ServiceOutput); backupSvc.Execute(); backupLength = ms.Length; } Assert.Greater(backupLength, 0); // suppose the "previous" test is done and the file is somewhere var backup = GetBackupRestoreFullPath(); Assert.IsNotNull(backup); Assert.AreEqual(new FileInfo(backup).Length, backupLength); }
private void StreamingBackupRestoreTest_BackupPart(MemoryStream buffer) { FbStreamingBackup backupSvc = new FbStreamingBackup(); backupSvc.ConnectionString = BuildServicesConnectionString(FbServerType); backupSvc.Options = FbBackupFlags.IgnoreLimbo; backupSvc.OutputStream = buffer; backupSvc.ServiceOutput += new EventHandler <ServiceOutputEventArgs>(ServiceOutput); backupSvc.Execute(); }
private void StreamingBackupRestoreTest_BackupPart(MemoryStream buffer) { var backupSvc = new FbStreamingBackup(); backupSvc.ConnectionString = BuildServicesConnectionString(FbServerType, Compression, true); backupSvc.Options = FbBackupFlags.IgnoreLimbo; backupSvc.OutputStream = buffer; backupSvc.ServiceOutput += ServiceOutput; backupSvc.Execute(); }