mirror of https://gitee.com/bigwinds/arangodb
improve assertions (#7829)
This commit is contained in:
parent
95d9d827c1
commit
49da84e941
|
@ -1,5 +1,5 @@
|
||||||
/*jshint strict: false, sub: true */
|
/*jshint strict: false, sub: true */
|
||||||
/*global print, assertTrue, assertEqual */
|
/*global print, assertTrue, assertEqual, assertNotEqual */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -311,7 +311,7 @@ function ActiveFailoverSuite() {
|
||||||
let oldLead = currentLead;
|
let oldLead = currentLead;
|
||||||
// await failover and check that follower get in sync
|
// await failover and check that follower get in sync
|
||||||
currentLead = checkForFailover(currentLead);
|
currentLead = checkForFailover(currentLead);
|
||||||
assertTrue(currentLead !== oldLead);
|
assertNotEqual(currentLead, oldLead);
|
||||||
print("Failover to new leader : ", currentLead);
|
print("Failover to new leader : ", currentLead);
|
||||||
|
|
||||||
internal.wait(5); // settle down, heartbeat interval is 1s
|
internal.wait(5); // settle down, heartbeat interval is 1s
|
||||||
|
@ -463,7 +463,7 @@ function ActiveFailoverSuite() {
|
||||||
/*testCleanup: function () {
|
/*testCleanup: function () {
|
||||||
|
|
||||||
let res = readAgencyValue("/arango/Plan/AsyncReplication/Leader");
|
let res = readAgencyValue("/arango/Plan/AsyncReplication/Leader");
|
||||||
assertTrue(res !== null);
|
assertNotEqual(res, null);
|
||||||
let uuid = res[0].arango.Plan.AsyncReplication.Leader;
|
let uuid = res[0].arango.Plan.AsyncReplication.Leader;
|
||||||
res = readAgencyValue("/arango/Supervision/Health");
|
res = readAgencyValue("/arango/Supervision/Health");
|
||||||
let lead = res[0].arango.Supervision.Health[uuid].Endpoint;
|
let lead = res[0].arango.Supervision.Health[uuid].Endpoint;
|
||||||
|
|
|
@ -418,7 +418,7 @@ function ActiveFailoverSuite() {
|
||||||
|
|
||||||
// await failover and check that follower get in sync
|
// await failover and check that follower get in sync
|
||||||
currentLead = checkForFailover(currentLead);
|
currentLead = checkForFailover(currentLead);
|
||||||
assertTrue(currentLead === firstLeader, "Did not fail to original leader");
|
assertEqual(currentLead, firstLeader, "Did not fail to original leader");
|
||||||
|
|
||||||
suspended.forEach(arangod => {
|
suspended.forEach(arangod => {
|
||||||
print("Resuming: ", arangod.endpoint);
|
print("Resuming: ", arangod.endpoint);
|
||||||
|
|
Loading…
Reference in New Issue