This is an automated email from the ASF dual-hosted git repository. tbouron pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
The following commit(s) were added to refs/heads/master by this push: new f3991df Add Flaky retry analyser to more tests which will retry tests 3 tests if necessary new 4c88c63 Merge pull request #1058 from tbouron/fix/flaky-tests-retry f3991df is described below commit f3991dfc2c34a3b6a30729b99edeb7385a5367b5 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> AuthorDate: Wed Mar 20 09:17:56 2019 +0000 Add Flaky retry analyser to more tests which will retry tests 3 tests if necessary --- .../brooklyn/camp/brooklyn/test/policy/failover/ElectPrimaryTest.java | 3 ++- .../org/apache/brooklyn/core/mgmt/rebind/RebindFeedWithHaTest.java | 3 ++- .../entity/software/base/SoftwareProcessStopsDuringStartTest.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) 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 b200491..09267fc 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 @@ -47,6 +47,7 @@ import org.apache.brooklyn.policy.failover.ElectPrimaryConfig.PrimaryDefaultSens import org.apache.brooklyn.policy.failover.ElectPrimaryConfig.SelectionMode; import org.apache.brooklyn.policy.failover.ElectPrimaryEffector; import org.apache.brooklyn.test.Asserts; +import org.apache.brooklyn.test.support.FlakyRetryAnalyser; import org.apache.brooklyn.test.support.LoggingVerboseReporter; import org.apache.brooklyn.util.collections.MutableList; import org.apache.brooklyn.util.core.config.ConfigBag; @@ -278,7 +279,7 @@ public class ElectPrimaryTest extends AbstractYamlRebindTest { // TODO tests for timeout configurability - @Test + @Test(retryAnalyzer = FlakyRetryAnalyser.class) public void testSelectionModeStrictReelectWithPreference() throws Exception { runSelectionModeTest(SelectionMode.STRICT, false); } diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindFeedWithHaTest.java b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindFeedWithHaTest.java index 6362a14..57a7316 100644 --- a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindFeedWithHaTest.java +++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindFeedWithHaTest.java @@ -34,6 +34,7 @@ import org.apache.brooklyn.api.sensor.Feed; import org.apache.brooklyn.core.entity.EntityAsserts; import org.apache.brooklyn.core.test.entity.TestApplication; import org.apache.brooklyn.core.test.entity.TestEntity; +import org.apache.brooklyn.test.support.FlakyRetryAnalyser; import org.apache.brooklyn.util.core.http.BetterMockWebServer; import org.apache.brooklyn.util.core.task.BasicExecutionManager; import org.apache.brooklyn.util.repeat.Repeater; @@ -83,7 +84,7 @@ public class RebindFeedWithHaTest extends RebindTestFixtureWithApp { return super.createApp(); } - @Test + @Test(retryAnalyzer = FlakyRetryAnalyser.class) public void testHttpFeedCleansUpAfterHaDisabledAndRunsAtFailover() throws Exception { TestEntity origEntity = origApp.createAndManageChild(EntitySpec.create(TestEntity.class).impl(RebindFeedTest.MyEntityWithHttpFeedImpl.class) .configure(RebindFeedTest.MyEntityWithHttpFeedImpl.BASE_URL, baseUrl)); diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessStopsDuringStartTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessStopsDuringStartTest.java index 3c8c100..420f05f 100644 --- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessStopsDuringStartTest.java +++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessStopsDuringStartTest.java @@ -51,6 +51,7 @@ import org.apache.brooklyn.location.ssh.SshMachineLocation; import org.apache.brooklyn.test.Asserts; import org.apache.brooklyn.test.LogWatcher; import org.apache.brooklyn.test.LogWatcher.EventPredicates; +import org.apache.brooklyn.test.support.FlakyRetryAnalyser; import org.apache.brooklyn.util.collections.MutableList; import org.apache.brooklyn.util.core.internal.ssh.RecordingSshTool; import org.apache.brooklyn.util.exceptions.Exceptions; @@ -140,7 +141,7 @@ public class SoftwareProcessStopsDuringStartTest extends BrooklynAppUnitTestSupp assertEquals(loc.getCalls(), ImmutableList.of("obtain", "release", "obtain", "release")); } - @Test + @Test(retryAnalyzer = FlakyRetryAnalyser.class) public void testStopDuringProvisionWaitsForCompletion() throws Exception { Future<?> startFuture = executor.submit(new Runnable() { @Override