From fccfb06687588c6155f0f77665be358837dd47e1 Mon Sep 17 00:00:00 2001 From: Steve Singer Date: Thu, 24 Oct 2013 21:29:32 -0400 Subject: [PATCH] fixing the failover unit test. It is sometimes possible for node 4 to get unsubscribed from set 1 because it doesn't have a subscription to set 2 but might be the farthest ahead node (but it isn't a failover candidate) Resubscribed node 4 before continuing on with the next test --- clustertest/disorder/tests/Failover.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/clustertest/disorder/tests/Failover.js b/clustertest/disorder/tests/Failover.js index 7ea4b0d..d01b0f6 100644 --- a/clustertest/disorder/tests/Failover.js +++ b/clustertest/disorder/tests/Failover.js @@ -297,8 +297,11 @@ Failover.prototype.runTest = function() { this.createSecondSet(1); this.subscribeSet(2,1, 1, [ 2, 3 ]); this.slonikSync(1,1); - this.failNode(1,2,true); + this.failNode(1,2,true); + + this.slonikSync(1,2); + this.compareDb('db1','db2'); this.compareDb('db1', 'db3'); @@ -309,6 +312,18 @@ Failover.prototype.runTest = function() { this.dropNode(1,2); this.reAddNode(1,2,2); + + + this.addCompletePaths(); + // NODE 4 MIGHT have been unsubscribed + // from set 1. This is because + // node 4 isn't subscribe to set 2. + // If node 4 was more ahead + // they are now unsubscribed. + this.slonikSync(1,1); + this.slonikSync(1,4); + this.subscribeSet(1,1,1,[4]); + this.slonikSync(1,2); this.moveSet(1,2,1); //stop slon 4 @@ -319,6 +334,7 @@ Failover.prototype.runTest = function() { this.coordinator.log('stopping load'); java.lang.Thread.sleep(3*30*1000); load2.stop(); + this.slonArray[3] = this.coordinator.createSlonLauncher('db4'); this.slonArray[3].run(); this.failNode(1,3,true); -- 1.7.10.4