aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-04 02:09:06 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-04 02:09:06 -0700
commit2f7710a75d8dd2f8eab9cb4e71f92c7787f00f76 (patch)
treeb0781bb489e4bea9cc3b6ee40ca603b20facb1ca
parent06133ae98fe3176b69d3a2a17a6793c94146a2c8 (diff)
downloadseaweedfs-2f7710a75d8dd2f8eab9cb4e71f92c7787f00f76.tar.xz
seaweedfs-2f7710a75d8dd2f8eab9cb4e71f92c7787f00f76.zip
debug sporadic test error on travis
-rw-r--r--weed/storage/disk_location_ec_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/weed/storage/disk_location_ec_test.go b/weed/storage/disk_location_ec_test.go
index 3ce04c6c0..c231ac0a9 100644
--- a/weed/storage/disk_location_ec_test.go
+++ b/weed/storage/disk_location_ec_test.go
@@ -1,7 +1,10 @@
package storage
import (
+ "io/ioutil"
"testing"
+
+ "github.com/chrislusf/seaweedfs/weed/glog"
)
func TestLoadingEcShards(t *testing.T) {
@@ -14,4 +17,15 @@ func TestLoadingEcShards(t *testing.T) {
if len(dl.ecVolumes) != 1 {
t.Errorf("loading err")
}
+
+ fileInfos, err := ioutil.ReadDir(dl.Directory)
+ if err != nil {
+ t.Errorf("listing all ec shards in dir %s: %v", dl.Directory, err)
+ }
+
+ glog.V(0).Infof("FileCount %d", len(fileInfos))
+ for i, fileInfo := range fileInfos {
+ glog.V(0).Infof("file:%d %s size:%d", i, fileInfo.Name(), fileInfo.Size())
+ }
+
}