brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/2] brooklyn-server git commit: Fix/disable integration tests
Date Mon, 12 Jun 2017 15:26:04 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master a98357415 -> 6bdad9200


Fix/disable integration tests


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

Branch: refs/heads/master
Commit: d0dea6b39e712ae15e2d5c35766f0994dc623f01
Parents: 41341c4
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Tue Jun 6 15:25:59 2017 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Tue Jun 6 15:25:59 2017 +0300

----------------------------------------------------------------------
 .../brooklyn/core/mgmt/ha/HotStandbyTest.java     |  9 +++++++--
 .../core/mgmt/rebind/ActivePartialRebindTest.java |  5 ++---
 .../policy/ha/ConnectionFailureDetectorTest.java  | 18 +++++++++++++++++-
 .../base/SoftwareProcessEntityFeedRebindTest.java |  5 ++++-
 4 files changed, 30 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d0dea6b3/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/HotStandbyTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/HotStandbyTest.java b/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/HotStandbyTest.java
index 9e3406d..8fc7a0d 100644
--- a/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/HotStandbyTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/HotStandbyTest.java
@@ -415,7 +415,8 @@ public class HotStandbyTest {
 //    Failing consistently with error:
 //        Jenkins: java.lang.AssertionError: Too much memory used - 158m > max 154m
 //        Svet local: java.lang.AssertionError: Too much memory used - 16m > max 13m
-    @Test(groups={"Integration", "Broken"})
+//    The test is not deterministic so marking as "Manual", i.e. probably shouldn't be included
in automated tests.
+    @Test(groups={"Integration", "Broken", "Manual"})
     public void testHotStandbyDoesNotLeakBigObjects() throws Exception {
         log.info("Starting test "+JavaClassNames.niceClassAndMethod());
         final int SIZE = 5;
@@ -463,7 +464,11 @@ public class HotStandbyTest {
         assertUsedMemoryLessThan("And now all unmanaged", initialUsed+GRACE*1000*1000);
     }
 
-    @Test(groups="Integration") // because it's slow
+    // Fails on Apache Jenkins with:
+    //  Too much memory used - 160m > max 160m
+    //  Too much memory used - 189m > max 188m
+    // The test is not deterministic so marking as "Manual", i.e. probably shouldn't be included
in automated tests.
+    @Test(groups={"Integration", "Broken", "Manual"}) // because it's slow
     // Sept 2014 - there is a small leak, of 200 bytes per child created and destroyed;
     // but this goes away when the app is destroyed; it may be a benign record
     public void testHotStandbyDoesNotLeakLotsOfRebindsCreatingAndDestroyingAChildEntity()
throws Exception {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d0dea6b3/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindTest.java
b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindTest.java
index e66bf8b..dab461f 100644
--- a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindTest.java
@@ -79,9 +79,8 @@ public class ActivePartialRebindTest extends RebindTestFixtureWithApp {
 
 //    Failing on Apache Jenkins with:
 //        Expected leak of less than 5M; leak was: from 38m to 43m expected [true] but found
[false]
-//    Perhaps we should create a separate group for these indeterministic (by design) tests
and run them
-//    only manually.
-    @Test(groups={"Integration", "Broken"})
+//    The test is not deterministic so marking as "Manual", i.e. probably shouldn't be included
in automated tests.
+    @Test(groups={"Integration", "Broken", "Manual"})
     public void testRebindCheckingMemoryLeak() throws Exception {
         TestEntity c1 = origApp.addChild(EntitySpec.create(TestEntity.class));
         c1.config().set(TestEntity.CONF_NAME, Strings.makeRandomId(1000000));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d0dea6b3/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
b/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
index 25f8d54..0ef1ac8 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
@@ -195,7 +195,23 @@ public class ConnectionFailureDetectorTest {
         assertHasEventEventually(HASensors.CONNECTION_FAILED, Predicates.<Object>equalTo(app),
null);
     }
     
-    @Test(groups="Integration") // Because slow
+//    Fails on Apache Jenkins with:
+//    Message: events=[Application[4ciretla].Sensor: ha.connectionRecovered (org.apache.brooklyn.policy.ha.HASensors$FailureDescriptor)=FailureDescriptor{component=Application[4ciretla],
description=endpoint=0.0.0.0:40099; healthy=true; timeNow=2017-06-06 10:51:34.075; lastUp=2017-06-06
10:51:33.069; lastDown=2017-06-06 10:51:33.069; lastPublished=FAILED; currentFailurePeriod=2.01s
(stabilization 0ms); currentRecoveryPeriod=1.01s (stabilization 1s)} @ 1496746294076] expected
[true] but found [false]
+//
+//            Stacktrace:
+//
+//            at org.testng.Assert.fail(Assert.java:94)
+//            at org.testng.Assert.failNotEquals(Assert.java:513)
+//            at org.testng.Assert.assertTrue(Assert.java:42)
+//            at org.apache.brooklyn.policy.ha.ConnectionFailureDetectorTest$4.run(ConnectionFailureDetectorTest.java:297)
+//            at org.apache.brooklyn.test.Asserts$RunnableAdapter.call(Asserts.java:1366)
+//            at org.apache.brooklyn.test.Asserts.succeedsContinually(Asserts.java:1042)
+//            at org.apache.brooklyn.test.Asserts.succeedsContinually(Asserts.java:1021)
+//            at org.apache.brooklyn.policy.ha.ConnectionFailureDetectorTest.assertNoEventsContinually(ConnectionFailureDetectorTest.java:295)
+//            at org.apache.brooklyn.policy.ha.ConnectionFailureDetectorTest.testRecoversThenDownUpResetsStabilisationCount(ConnectionFailureDetectorTest.java:271)
+//
+//  Fails in the same way with FEATURE_JITTER_THREADS enabled.
+    @Test(groups={"Integration", "Broken"}) // Because slow
     public void testFailuresThenUpDownResetsStabilisationCount() throws Exception {
         final long stabilisationDelay = 1000;
         

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d0dea6b3/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityFeedRebindTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityFeedRebindTest.java
b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityFeedRebindTest.java
index 87962d6..64fbbfd 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityFeedRebindTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityFeedRebindTest.java
@@ -107,7 +107,10 @@ public class SoftwareProcessEntityFeedRebindTest extends RebindTestFixtureWithAp
         for (Entity child : origApp.getChildren()) {
             EntityAsserts.assertAttributeEquals(child, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
             EntityAsserts.assertAttributeEquals(child, Attributes.SERVICE_UP, Boolean.TRUE);
-            EntityAsserts.assertAttributeEquals(child, SoftwareProcess.SERVICE_PROCESS_IS_RUNNING,
Boolean.TRUE);
+            // start() waits on driver.isRunning() directly, not through SERVICE_PROCESS_IS_RUNNING
+            // It could happen that driver.isRunning() returns true, but the feed for SERVICE_PROCESS_IS_RUNNING
+            // still didn't have the chance to execute so the sensor is still null.
+            EntityAsserts.assertAttributeEqualsEventually(child, SoftwareProcess.SERVICE_PROCESS_IS_RUNNING,
Boolean.TRUE);
         }
 
         LOG.info("Rebinding "+numEntities+" entities");


Mime
View raw message