fixing generate load origin node parameter mismatch
authorSteve Singer <ssinger@ca.afilias.info>
Tue, 13 May 2014 13:49:37 +0000 (09:49 -0400)
committerSteve Singer <ssinger@ca.afilias.info>
Mon, 30 Jun 2014 13:07:58 +0000 (09:07 -0400)
clustertest/disorder/tests/BasicTest.js
clustertest/disorder/tests/BulkAddingTest.js
clustertest/disorder/tests/MultinodeFailover.js
clustertest/disorder/tests/MultipleOrigins.js
clustertest/disorder/tests/SiteFailover.js

index 3dd84d4186783e799f0ea0b177fe658226b6b478..7abb6080ec081dae6a97e788533d5bc4d0f8f16c 100644 (file)
@@ -587,8 +587,9 @@ BasicTest.prototype.teardownSlony = function() {
 
 
 
-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');
index 9cd60ba6191f47a75c948439b68f253928472b74..d47a2e411266dfbd4cc4e26eb64944c47ab96a01 100644 (file)
@@ -95,7 +95,7 @@ BulkAddingTest.prototype.runTest = function() {
         * 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();
index f3f1d48ae28ca0ff7261676e9fff299d538611c9..ae94a26da981a98fe37144cd74dd7c80d2b6c1aa 100644 (file)
@@ -47,7 +47,7 @@ MultinodeFailover.prototype.runTest = function() {
        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);
@@ -149,6 +149,7 @@ MultinodeFailover.prototype.runTest = function() {
        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);
        /**
index 0caab59baca6840815cbffd1f08422553a7949a6..9a7bcf2d0f8c1a2d2a8cae7b2b58ddc868057879 100644 (file)
@@ -64,7 +64,7 @@ MultipleOrigins.prototype.runTest = function() {
         *  
         *  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);
@@ -78,7 +78,7 @@ MultipleOrigins.prototype.runTest = function() {
         */     
        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);
@@ -91,7 +91,7 @@ MultipleOrigins.prototype.runTest = function() {
        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);
index 087b6d6a3b56f22f26c5b7d0523214d5b6aa8ca1..2ec1afad50b2e978f35d36b42686c489bed6426c 100644 (file)
@@ -17,7 +17,7 @@ SiteFailover.prototype.getNodeCount = function() {
 
 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();
     
@@ -95,7 +95,7 @@ SiteFailover.prototype.runTest = function() {
     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);
@@ -123,13 +123,15 @@ SiteFailover.prototype.runTest = function() {
        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]);