You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by dr...@apache.org on 2018/01/11 14:45:31 UTC

[1/2] brooklyn-server git commit: ElectPrimaryTest: decrease race

Repository: brooklyn-server
Updated Branches:
  refs/heads/master 792f4dd79 -> 387ec1143


ElectPrimaryTest: decrease race


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/3c311141
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/3c311141
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/3c311141

Branch: refs/heads/master
Commit: 3c31114103f63b6bf7d6fd865eb543173ffc93bc
Parents: 792f4dd
Author: Aled Sage <al...@gmail.com>
Authored: Thu Jan 11 13:21:27 2018 +0000
Committer: Aled Sage <al...@gmail.com>
Committed: Thu Jan 11 13:28:34 2018 +0000

----------------------------------------------------------------------
 .../brooklyn/test/policy/failover/ElectPrimaryTest.java     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3c311141/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/test/policy/failover/ElectPrimaryTest.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/test/policy/failover/ElectPrimaryTest.java b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/test/policy/failover/ElectPrimaryTest.java
index b7be4ff..b200491 100644
--- a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/test/policy/failover/ElectPrimaryTest.java
+++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/test/policy/failover/ElectPrimaryTest.java
@@ -63,6 +63,7 @@ import org.testng.reporters.FailedReporter;
 
 import com.google.common.base.Predicates;
 import com.google.common.base.Stopwatch;
+import com.google.common.collect.ImmutableMap;
 
 // TODO this test is in the CAMP package because YAML not available in policies package
 public class ElectPrimaryTest extends AbstractYamlRebindTest {
@@ -287,6 +288,12 @@ public class ElectPrimaryTest extends AbstractYamlRebindTest {
         runSelectionModeTest(SelectionMode.BEST, false);
     }
 
+    /**
+     * TODO Non-deterministic test failure. Policy invokes effector (due to sensor-changed)
+     * at same time as test explicitly invokes effector: it fails over to 'b' and then back
+     * to 'a'. See https://github.com/apache/brooklyn-server/pull/931 to reduce this race,
+     * and for more details.
+     */
     @Test
     public void testSelectionModeFailoverReelectWithPreference() throws Exception {
         runSelectionModeTest(SelectionMode.FAILOVER, false);
@@ -396,7 +403,7 @@ public class ElectPrimaryTest extends AbstractYamlRebindTest {
         if (integration) {
             EntityAsserts.assertAttributeEqualsContinually(app, PRIMARY, a);
         } else {
-            EntityAsserts.assertAttributeEquals(app, PRIMARY, a);
+            EntityAsserts.assertAttributeEqualsContinually(ImmutableMap.of("timeout", Duration.millis(100)), app, PRIMARY, a);
         }
     }
 


[2/2] brooklyn-server git commit: This closes #931

Posted by dr...@apache.org.
This closes #931


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/387ec114
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/387ec114
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/387ec114

Branch: refs/heads/master
Commit: 387ec114397673cd62104ba62875c291b9364fbf
Parents: 792f4dd 3c31114
Author: Duncan Godwin <dr...@googlemail.com>
Authored: Thu Jan 11 14:45:24 2018 +0000
Committer: Duncan Godwin <dr...@googlemail.com>
Committed: Thu Jan 11 14:45:24 2018 +0000

----------------------------------------------------------------------
 .../brooklyn/test/policy/failover/ElectPrimaryTest.java     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------