mirror of https://gitee.com/bigwinds/arangodb
Test code for sync. replication.
This commit is contained in:
parent
c36e2c42ad
commit
6e984b8411
|
@ -77,7 +77,7 @@ function SynchronousReplicationSuite () {
|
|||
);
|
||||
let replicas = ccinfo.map(s => s.servers.length);
|
||||
if (_.all(replicas, x => x === 2)) {
|
||||
console.info("Replication up and running!");
|
||||
console.warn("Replication up and running!");
|
||||
return true;
|
||||
}
|
||||
wait(0.5);
|
||||
|
@ -98,6 +98,7 @@ function SynchronousReplicationSuite () {
|
|||
x => x.endpoint === endpoint);
|
||||
assertTrue(pos >= 0);
|
||||
assertTrue(suspendExternal(global.instanceInfo.arangods[pos].pid));
|
||||
console.warn("Have failed follower", follower);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -112,6 +113,7 @@ function SynchronousReplicationSuite () {
|
|||
x => x.endpoint === endpoint);
|
||||
assertTrue(pos >= 0);
|
||||
assertTrue(continueExternal(global.instanceInfo.arangods[pos].pid));
|
||||
console.warn("Have healed follower", follower);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -126,6 +128,7 @@ function SynchronousReplicationSuite () {
|
|||
x => x.endpoint === endpoint);
|
||||
assertTrue(pos >= 0);
|
||||
assertTrue(suspendExternal(global.instanceInfo.arangods[pos].pid));
|
||||
console.warn("Have failed leader", leader);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -140,6 +143,7 @@ function SynchronousReplicationSuite () {
|
|||
x => x.endpoint === endpoint);
|
||||
assertTrue(pos >= 0);
|
||||
assertTrue(continueExternal(global.instanceInfo.arangods[pos].pid));
|
||||
console.warn("Have healed leader", leader);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -332,6 +336,7 @@ function SynchronousReplicationSuite () {
|
|||
/// @brief check whether we have access to global.instanceInfo
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
testCheckInstanceInfo : function () {
|
||||
assertTrue(global.instanceInfo !== undefined);
|
||||
},
|
||||
|
@ -534,12 +539,11 @@ function SynchronousReplicationSuite () {
|
|||
runBasicOperations({place:17, follower:true}, {place:17, follower:true});
|
||||
assertTrue(waitForSynchronousReplication("_system"));
|
||||
},
|
||||
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief run a standard check with failures:
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
testBasicOperationsFailureLeader : function () {
|
||||
assertTrue(waitForSynchronousReplication("_system"));
|
||||
failLeader();
|
||||
|
@ -547,7 +551,29 @@ function SynchronousReplicationSuite () {
|
|||
healLeader();
|
||||
assertTrue(waitForSynchronousReplication("_system"));
|
||||
},
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief fail leader in place 1
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testBasicOperationsLeaderFail1 : function () {
|
||||
assertTrue(waitForSynchronousReplication("_system"));
|
||||
runBasicOperations({place:1, follower: false},
|
||||
{place:17, follower: false});
|
||||
assertTrue(waitForSynchronousReplication("_system"));
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief fail leader in place 17
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testBasicOperationsLeaderFail17 : function () {
|
||||
assertTrue(waitForSynchronousReplication("_system"));
|
||||
runBasicOperations({place:17, follower: false},
|
||||
{place:17, follower: false});
|
||||
assertTrue(waitForSynchronousReplication("_system"));
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief just to allow a trailing comma at the end of the last test
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue