1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-15 15:53:26 +00:00

Merge pull request #606 from gilbertchen/erasure_coding

Implement Erasure Coding
This commit is contained in:
gilbertchen
2020-09-25 14:30:39 -04:00
committed by GitHub
7 changed files with 336 additions and 54 deletions

View File

@@ -232,12 +232,20 @@ func TestBackupManager(t *testing.T) {
cleanStorage(storage)
time.Sleep(time.Duration(delay) * time.Second)
dataShards := 0
parityShards := 0
if testErasureCoding {
dataShards = 5
parityShards = 2
}
if testFixedChunkSize {
if !ConfigStorage(storage, 16384, 100, 64*1024, 64*1024, 64*1024, password, nil, false, "") {
if !ConfigStorage(storage, 16384, 100, 64*1024, 64*1024, 64*1024, password, nil, false, "", dataShards, parityShards) {
t.Errorf("Failed to initialize the storage")
}
} else {
if !ConfigStorage(storage, 16384, 100, 64*1024, 256*1024, 16*1024, password, nil, false, "") {
if !ConfigStorage(storage, 16384, 100, 64*1024, 256*1024, 16*1024, password, nil, false, "", dataShards, parityShards) {
t.Errorf("Failed to initialize the storage")
}
}