1
0
Fork 0

improve assertions (#7829)

This commit is contained in:
Simon 2019-01-09 10:29:36 +01:00 committed by Jan
parent 95d9d827c1
commit 49da84e941
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*jshint strict: false, sub: true */
/*global print, assertTrue, assertEqual */
/*global print, assertTrue, assertEqual, assertNotEqual */
'use strict';
////////////////////////////////////////////////////////////////////////////////
@ -311,7 +311,7 @@ function ActiveFailoverSuite() {
let oldLead = currentLead;
// await failover and check that follower get in sync
currentLead = checkForFailover(currentLead);
assertTrue(currentLead !== oldLead);
assertNotEqual(currentLead, oldLead);
print("Failover to new leader : ", currentLead);
internal.wait(5); // settle down, heartbeat interval is 1s
@ -463,7 +463,7 @@ function ActiveFailoverSuite() {
/*testCleanup: function () {
let res = readAgencyValue("/arango/Plan/AsyncReplication/Leader");
assertTrue(res !== null);
assertNotEqual(res, null);
let uuid = res[0].arango.Plan.AsyncReplication.Leader;
res = readAgencyValue("/arango/Supervision/Health");
let lead = res[0].arango.Supervision.Health[uuid].Endpoint;

View File

@ -418,7 +418,7 @@ function ActiveFailoverSuite() {
// await failover and check that follower get in sync
currentLead = checkForFailover(currentLead);
assertTrue(currentLead === firstLeader, "Did not fail to original leader");
assertEqual(currentLead, firstLeader, "Did not fail to original leader");
suspended.forEach(arangod => {
print("Resuming: ", arangod.endpoint);