distributed-XL: Support to run one minio process per export even on the same machine. (#2999)

fixes #2983
This commit is contained in:
Krishna Srinivas
2016-10-19 01:19:24 +05:30
committed by Harshavardhana
parent 41f9ab1c69
commit 32c3a558e9
29 changed files with 688 additions and 416 deletions

View File

@@ -163,11 +163,15 @@ func testTreeWalkMarker(t *testing.T, listDir listDirFunc, isLeaf isLeafFunc) {
func TestTreeWalk(t *testing.T) {
fsDir, err := ioutil.TempDir("", "minio-")
if err != nil {
t.Errorf("Unable to create tmp directory: %s", err)
t.Fatalf("Unable to create tmp directory: %s", err)
}
disk, err := newStorageAPI(fsDir)
endpoint, err := parseStorageEndPoint(fsDir, 0)
if err != nil {
t.Errorf("Unable to create StorageAPI: %s", err)
t.Fatalf("Unexpected error %s", err)
}
disk, err := newStorageAPI(endpoint)
if err != nil {
t.Fatalf("Unable to create StorageAPI: %s", err)
}
var files = []string{
@@ -200,11 +204,15 @@ func TestTreeWalk(t *testing.T) {
func TestTreeWalkTimeout(t *testing.T) {
fsDir, err := ioutil.TempDir("", "minio-")
if err != nil {
t.Errorf("Unable to create tmp directory: %s", err)
t.Fatalf("Unable to create tmp directory: %s", err)
}
disk, err := newStorageAPI(fsDir)
endpoint, err := parseStorageEndPoint(fsDir, 0)
if err != nil {
t.Errorf("Unable to create StorageAPI: %s", err)
t.Fatalf("Unexpected error %s", err)
}
disk, err := newStorageAPI(endpoint)
if err != nil {
t.Fatalf("Unable to create StorageAPI: %s", err)
}
var myfiles []string
// Create maxObjectsList+1 number of entries.
@@ -278,12 +286,23 @@ func TestListDir(t *testing.T) {
t.Errorf("Unable to create tmp directory: %s", err)
}
endpoint1, err := parseStorageEndPoint(fsDir1, 0)
if err != nil {
t.Fatalf("Unexpected error %s", err)
}
// Create two StorageAPIs disk1 and disk2.
disk1, err := newStorageAPI(fsDir1)
disk1, err := newStorageAPI(endpoint1)
if err != nil {
t.Errorf("Unable to create StorageAPI: %s", err)
}
disk2, err := newStorageAPI(fsDir2)
endpoint2, err := parseStorageEndPoint(fsDir2, 0)
if err != nil {
t.Fatalf("Unexpected error %s", err)
}
disk2, err := newStorageAPI(endpoint2)
if err != nil {
t.Errorf("Unable to create StorageAPI: %s", err)
}
@@ -348,13 +367,18 @@ func TestRecursiveTreeWalk(t *testing.T) {
// Create a backend directories fsDir1.
fsDir1, err := ioutil.TempDir("", "minio-")
if err != nil {
t.Errorf("Unable to create tmp directory: %s", err)
t.Fatalf("Unable to create tmp directory: %s", err)
}
endpoint1, err := parseStorageEndPoint(fsDir1, 0)
if err != nil {
t.Fatalf("Unexpected error %s", err)
}
// Create two StorageAPIs disk1.
disk1, err := newStorageAPI(fsDir1)
disk1, err := newStorageAPI(endpoint1)
if err != nil {
t.Errorf("Unable to create StorageAPI: %s", err)
t.Fatalf("Unable to create StorageAPI: %s", err)
}
// Simple isLeaf check, returns true if there is no trailing "/"
@@ -458,8 +482,13 @@ func TestSortedness(t *testing.T) {
t.Errorf("Unable to create tmp directory: %s", err)
}
endpoint1, err := parseStorageEndPoint(fsDir1, 0)
if err != nil {
t.Fatalf("Unexpected error %s", err)
}
// Create two StorageAPIs disk1.
disk1, err := newStorageAPI(fsDir1)
disk1, err := newStorageAPI(endpoint1)
if err != nil {
t.Errorf("Unable to create StorageAPI: %s", err)
}
@@ -533,8 +562,13 @@ func TestTreeWalkIsEnd(t *testing.T) {
t.Errorf("Unable to create tmp directory: %s", err)
}
endpoint1, err := parseStorageEndPoint(fsDir1, 0)
if err != nil {
t.Fatalf("Unexpected error %s", err)
}
// Create two StorageAPIs disk1.
disk1, err := newStorageAPI(fsDir1)
disk1, err := newStorageAPI(endpoint1)
if err != nil {
t.Errorf("Unable to create StorageAPI: %s", err)
}