volume: load ec shards during heartbeats to master
This commit is contained in:
17
weed/storage/disk_location_ec_test.go
Normal file
17
weed/storage/disk_location_ec_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLoadingEcShards(t *testing.T) {
|
||||
dl := NewDiskLocation("./erasure_coding", 100)
|
||||
err := dl.loadAllEcShards()
|
||||
if err != nil {
|
||||
t.Errorf("load all ec shards: %v", err)
|
||||
}
|
||||
|
||||
if len(dl.ecShards)!=1 {
|
||||
t.Errorf("loading err")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user