Commit 8e7efe86 authored by Tristan Cavelier's avatar Tristan Cavelier

replicate revision storage jiotests improved

parent e9dbaa5a
...@@ -2959,52 +2959,18 @@ module ("JIO Replicate Revision Storage"); ...@@ -2959,52 +2959,18 @@ module ("JIO Replicate Revision Storage");
}); });
}); });
test("Storage Synchronisation (Replicate Revision Repair)", function () { var replicateStorageSynchronisationGenerator = function (
that,
var o = generateTools(this); description,
index
o.jio = JIO.newJio({ ) {
"type": "replicaterevision", var o = generateTools(that);
"storage_list": [{
"type": "replicaterevision", o.jio = JIO.newJio(description);
"storage_list": [{ o.localpath1 = "jio/localstorage/usyncreprevlocloc1/" + index;
"type": "revision", o.localpath2 = "jio/localstorage/usyncreprevlocloc2/" + index;
"sub_storage": { o.localpath3 = "jio/localstorage/usyncreprevlocloc3/" + index;
"type": "local", o.localpath4 = "jio/localstorage/usyncreprevlocloc4/" + index;
"username": "usyncreprevlocloc1",
"application_name": "2"
}
}, {
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc2",
"application_name": "2"
}
}]
}, {
"type": "replicaterevision",
"storage_list": [{
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc3",
"application_name": "2"
}
}, {
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc4",
"application_name": "2"
}
}]
}]
});
o.localpath1 = "jio/localstorage/usyncreprevlocloc1/2";
o.localpath2 = "jio/localstorage/usyncreprevlocloc2/2";
o.localpath3 = "jio/localstorage/usyncreprevlocloc3/2";
o.localpath4 = "jio/localstorage/usyncreprevlocloc4/2";
// add documents to localstorage // add documents to localstorage
o.doctree1_1 = { o.doctree1_1 = {
...@@ -3177,6 +3143,83 @@ module ("JIO Replicate Revision Storage"); ...@@ -3177,6 +3143,83 @@ module ("JIO Replicate Revision Storage");
o.jio.stop(); o.jio.stop();
};
test("Storage Synchronisation (Repair) 4x [Rev + Local]", function () {
replicateStorageSynchronisationGenerator(this, {
"type": "replicaterevision",
"storage_list": [{
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc1",
"application_name": "1"
}
}, {
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc2",
"application_name": "1"
}
}, {
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc3",
"application_name": "1"
}
}, {
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc4",
"application_name": "1"
}
}]
}, "1");
});
test("Storage Synchronisation (Repair) 2x [Rep 2x [Rev + Local]]",
function () {
replicateStorageSynchronisationGenerator(this, {
"type": "replicaterevision",
"storage_list": [{
"type": "replicaterevision",
"storage_list": [{
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc1",
"application_name": "2"
}
}, {
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc2",
"application_name": "2"
}
}]
}, {
"type": "replicaterevision",
"storage_list": [{
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc3",
"application_name": "2"
}
}, {
"type": "revision",
"sub_storage": {
"type": "local",
"username": "usyncreprevlocloc4",
"application_name": "2"
}
}]
}]
}, "2");
}); });
/* /*
module ("Jio DAVStorage"); module ("Jio DAVStorage");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment