From 41341c493341cd7d726d18dec7f690f5e4c47618 Mon Sep 17 00:00:00 2001 From: Svetoslav Neykov Date: Fri, 2 Jun 2017 18:03:00 +0300 Subject: [PATCH] Fixing/disabling failing integration tests --- .../apache/brooklyn/core/mgmt/ha/HotStandbyTest.java | 5 ++++- .../core/mgmt/rebind/ActivePartialRebindTest.java | 6 +++++- .../brooklyn/location/jclouds/JcloudsLocation.java | 2 +- .../framework/LoopOverGroupMembersTestCaseTest.java | 2 +- .../test/framework/TestFrameworkAssertionsTest.java | 10 +++++++++- 5 files changed, 20 insertions(+), 5 deletions(-) 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 abdee4008e..9e3406d9ca 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 @@ -412,7 +412,10 @@ static class BigObject { byte[] array; } - @Test(groups="Integration") +// 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"}) public void testHotStandbyDoesNotLeakBigObjects() throws Exception { log.info("Starting test "+JavaClassNames.niceClassAndMethod()); final int SIZE = 5; 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 771171d36c..e66bf8baed 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 @@ -77,7 +77,11 @@ public void testRebindParentSimple() throws Exception { Assert.assertTrue( ((EntityInternal)c1b).getManagementSupport().isDeployed(), "Not deployed: "+c1b ); } - @Test(groups="Integration") +// 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"}) public void testRebindCheckingMemoryLeak() throws Exception { TestEntity c1 = origApp.addChild(EntitySpec.create(TestEntity.class)); c1.config().set(TestEntity.CONF_NAME, Strings.makeRandomId(1000000)); diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java index e4fb0c21b4..887ebcbcd7 100644 --- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java +++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java @@ -202,7 +202,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im private static final int NOTES_MAX_LENGTH = 1000; @VisibleForTesting - static final String AWS_VPC_HELP_URL = "http://brooklyn.apache.org/v/latest/ops/locations/index.html#ec2-classic-problems-with-vpc-only-hardware-instance-types"; + static final String AWS_VPC_HELP_URL = "http://brooklyn.apache.org/v/latest/locations/#ec2-classic-problems-with-vpc-only-hardware-instance-types"; private final AtomicBoolean listedAvailableTemplatesOnNoSuchTemplate = new AtomicBoolean(false); diff --git a/test-framework/src/test/java/org/apache/brooklyn/test/framework/LoopOverGroupMembersTestCaseTest.java b/test-framework/src/test/java/org/apache/brooklyn/test/framework/LoopOverGroupMembersTestCaseTest.java index 261ded138b..b5f0cc27f3 100644 --- a/test-framework/src/test/java/org/apache/brooklyn/test/framework/LoopOverGroupMembersTestCaseTest.java +++ b/test-framework/src/test/java/org/apache/brooklyn/test/framework/LoopOverGroupMembersTestCaseTest.java @@ -55,7 +55,7 @@ public class LoopOverGroupMembersTestCaseTest { private static final AttributeSensorAndConfigKey STRING_SENSOR = ConfigKeys.newSensorAndConfigKey(String.class, "string-sensor", "String Sensor"); - @BeforeMethod + @BeforeMethod(alwaysRun = true) public void setup() { app = TestApplication.Factory.newManagedInstanceForTests(); diff --git a/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestFrameworkAssertionsTest.java b/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestFrameworkAssertionsTest.java index b698f0fb8f..c6540bf6ef 100644 --- a/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestFrameworkAssertionsTest.java +++ b/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestFrameworkAssertionsTest.java @@ -255,9 +255,17 @@ public String get() { } } +// Disabled because failing (consistently) with: +// java.lang.AssertionError: invalid time-diff at 18: [11ms, 13ms, 15ms, 19ms, 21ms, 26ms, 30ms, 37ms, 43ms, 53ms, 62ms, 76ms, 90ms, 101ms, 100ms, 100ms, 101ms, 100ms, 3ms] expected [true] but found [false] +// 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.test.framework.TestFrameworkAssertionsTest.assertOrdered(TestFrameworkAssertionsTest.java:315) +// at org.apache.brooklyn.test.framework.TestFrameworkAssertionsTest.testRetryBackoffs(TestFrameworkAssertionsTest.java:307) +// Previous comment: // Integration because test is time-sensitive. May fail sometimes on highly contended hardware. // Also test takes a second to run. - @Test(groups="Integration") + @Test(groups={"Integration", "Broken"}) public void testRetryBackoffs() { final Stopwatch stopwatch = Stopwatch.createStarted(); final List timestamps = Lists.newArrayList();