File tree Expand file tree Collapse file tree
tests/AgDatabaseMove.Unit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,11 +111,20 @@ public static List<BackupMetadata> GetBackupListWithStripes()
111111 {
112112 var list = GetBackupList ( ) ;
113113 var listWithStripes = CloneBackupMetaDataList ( list ) . ToList ( ) ;
114+ var listWithStripes2 = CloneBackupMetaDataList ( list ) . ToList ( ) ;
115+
114116 listWithStripes . ForEach ( b => {
115117 var path = b . PhysicalDeviceName . Split ( '.' ) ;
116118 b . PhysicalDeviceName = $ "{ path [ 0 ] } _striped.{ path [ 1 ] } ";
117119 } ) ;
120+
121+ listWithStripes2 . ForEach ( b => {
122+ var path = b . PhysicalDeviceName . Split ( '.' ) ;
123+ b . PhysicalDeviceName = $ "{ path [ 0 ] } _striped2.{ path [ 1 ] } ";
124+ } ) ;
125+
118126 list . AddRange ( listWithStripes ) ;
127+ list . AddRange ( listWithStripes2 ) ;
119128 return list ;
120129 }
121130
Original file line number Diff line number Diff line change @@ -16,9 +16,10 @@ public class StripedBackupSetTests
1616 public void CombinesStripedBackups ( )
1717 {
1818 var backupChain = BackupOrder . GetBackupListWithStripes ( ) ;
19+
1920 var stripedBackupSetChain = StripedBackupSet . GetStripedBackupSetChain ( backupChain ) ;
2021
21- Assert . Equal ( backupChain . Count / 2 , stripedBackupSetChain . Count ( ) ) ;
22+ Assert . Equal ( backupChain . Distinct ( stripedBackupComparer ) . Count ( ) , stripedBackupSetChain . Count ( ) ) ;
2223 }
2324
2425 [ Fact ]
@@ -34,6 +35,8 @@ public void DoesntCombineNonStripedBackups()
3435 public void StripedBackupsAreEqualExceptForPhysicalDeviceName ( )
3536 {
3637 var backupChain = BackupOrder . GetBackupListWithStripes ( ) ;
38+
39+
3740 var stripedBackupSetChain = StripedBackupSet . GetStripedBackupSetChain ( backupChain ) ;
3841
3942 foreach ( var stripedBackupSet in stripedBackupSetChain )
You can’t perform that action at this time.
0 commit comments