-BasicTest.prototype.generateLoad = function(set_origin) {
+BasicTest.prototype.generateLoad = function() {
+ var set_origin = this.getCurrentOrigin();
this.coordinator.log("BasicTest.prototype.generateLoad - origin[" + set_origin + "] - start");
var disorderClientJs = this.coordinator.readFile('disorder/client/disorder.js');
disorderClientJs+= this.coordinator.readFile('disorder/client/run_fixed_load.js');
* run some load through the system to make sure
* everything replicates as expected.
*/
- var populate=this.generateLoad('db1');
+ var populate=this.generateLoad();
this.subscribeSet(1,1,1,[3]);
java.lang.Thread.sleep(3*1000);
populate.stop();
this.slonikSync(1,1);
this.createSecondSet(2);
this.subscribeSet(2,2,2,[3,4,5]);
- this.slonikSync(2,2);
+ this.slonikSync(2,2);
var load = this.generateLoad();
java.lang.Thread.sleep(10*1000);
this.slonikSync(1,1);
slonik.run();
this.coordinator.join(slonik);
this.testResults.assertCheck('failover passes',slonik.getReturnCode(),0);
+ this.currentOrigin='db2';
load=this.generateLoad();
java.lang.Thread.sleep(1000);
/**
*
* where set 1 is origin on 1, set 2 is origin on 2.
*/
- var load = this.generateLoad(1);
+ var load = this.generateLoad();
java.lang.Thread.sleep(10*1000);
load.stop();
this.coordinator.join(load);
*/
this.moveSet(1,1,4);
this.currentOrigin='db4';
- load = this.generateLoad(4);
+ load = this.generateLoad();
java.lang.Thread.sleep(10*1000);
load.stop();
this.coordinator.join(load);
this.slonikSync(1,1);
this.slonikSync(1,4);
this.failNode(1,4,true);
- load = this.generateLoad(4);
+ load = this.generateLoad();
java.lang.Thread.sleep(10*1000);
load.stop();
this.coordinator.join(load);
SiteFailover.prototype.runTest = function() {
this.coordinator.log("SiteFailover.prototype.runTest - begin");
- this.testResults.newGroup("Multinode Fail Over Test");
+ this.testResults.newGroup("Site Fail Over Test");
basicTest.prepareDb(['db6']);
this.setupReplication();
this.subscribeSet(2,3,3,[1,4,5]);
this.subscribeSet(2,3,5,[2,6]);
this.slonikSync(1,1);
- var load = this.generateLoad(1);
+ var load = this.generateLoad();
java.lang.Thread.sleep(10*1000);
this.slonikSync(1,1);
this.populateReviewTable(2);
slonik.run();
this.coordinator.join(slonik);
this.testResults.assertCheck('drop 3 nodes passes',slonik.getReturnCode(),0);
-
- load = this.generateLoad(2);
+ this.currentOrigin='db2';
+ load = this.generateLoad();
java.lang.Thread.sleep(10*1000);
+ load.stop();
+ this.coordinator.join(load);
this.slonikSync(1,2);
this.slonikSync(2,5);
-
+
for ( var idx = 1; idx <= this.getNodeCount(); idx++) {
this.slonArray[idx - 1].stop();
this.coordinator.join(this.slonArray[idx - 1]);