You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sj...@apache.org on 2017/03/24 18:45:59 UTC

[2/6] brooklyn-server git commit: Mark failing integration tests as Broken

Mark failing integration tests as Broken


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

Branch: refs/heads/master
Commit: 32ccd248988c1f90cdde26aa23e6d8597c14a33d
Parents: f74ce8f
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Fri Mar 24 12:49:25 2017 +0200
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Fri Mar 24 12:56:14 2017 +0200

----------------------------------------------------------------------
 .../brooklyn/policy/ha/ServiceReplacerTest.java | 16 +++++-
 .../lifecycle/ScriptHelperIntegrationTest.java  | 53 ++++++++++++++------
 2 files changed, 53 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/32ccd248/policy/src/test/java/org/apache/brooklyn/policy/ha/ServiceReplacerTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/ha/ServiceReplacerTest.java b/policy/src/test/java/org/apache/brooklyn/policy/ha/ServiceReplacerTest.java
index 4aead1a..9c17614 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/ha/ServiceReplacerTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/ha/ServiceReplacerTest.java
@@ -177,7 +177,19 @@ public class ServiceReplacerTest {
         assertEventuallyHasEntityReplacementFailedEvent(cluster);
     }
     
-    @Test(groups="Integration") // has a 1 second wait
+
+//    Fails with:
+//    java.lang.AssertionError: Unexpected ON_FIRE state
+//        at org.testng.Assert.fail(Assert.java:94)
+//        at org.testng.Assert.assertNotEquals(Assert.java:832)
+//        at org.apache.brooklyn.policy.ha.ServiceReplacerTest$3.run(ServiceReplacerTest.java:204)
+//        at org.apache.brooklyn.test.Asserts$RunnableAdapter.call(Asserts.java:1359)
+//        at org.apache.brooklyn.test.Asserts.succeedsContinually(Asserts.java:1039)
+//        at org.apache.brooklyn.test.Asserts.succeedsContinually(Asserts.java:1018)
+//        at org.apache.brooklyn.test.Asserts.succeedsContinually(Asserts.java:1014)
+//        at org.apache.brooklyn.policy.ha.ServiceReplacerTest.testDoesNotOnFireWhenFailToReplaceMember(ServiceReplacerTest.java:214)
+//
+    @Test(groups={"Integration", "Broken"}) // has a 1 second wait
     public void testDoesNotOnFireWhenFailToReplaceMember() throws Exception {
         app.subscriptions().subscribe(null, ServiceReplacer.ENTITY_REPLACEMENT_FAILED, eventListener);
         
@@ -201,7 +213,7 @@ public class ServiceReplacerTest {
         // Configured to not mark cluster as on fire
         Asserts.succeedsContinually(new Runnable() {
             @Override public void run() {
-                assertNotEquals(cluster.getAttribute(Attributes.SERVICE_STATE_ACTUAL), Lifecycle.ON_FIRE);
+                assertNotEquals(cluster.getAttribute(Attributes.SERVICE_STATE_ACTUAL), Lifecycle.ON_FIRE, "Unexpected ON_FIRE state");
             }});
         
         // And will have received notification event about it

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/32ccd248/software/base/src/test/java/org/apache/brooklyn/entity/software/base/lifecycle/ScriptHelperIntegrationTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/lifecycle/ScriptHelperIntegrationTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/lifecycle/ScriptHelperIntegrationTest.java
index 0566f39..0a1d4b2 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/lifecycle/ScriptHelperIntegrationTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/lifecycle/ScriptHelperIntegrationTest.java
@@ -18,11 +18,13 @@
  */
 package org.apache.brooklyn.entity.software.base.lifecycle;
 
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-import org.apache.brooklyn.api.entity.EntityLocal;
+import static java.lang.String.format;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotEquals;
+
+import java.io.StringReader;
+
 import org.apache.brooklyn.api.entity.EntitySpec;
 import org.apache.brooklyn.api.location.Location;
 import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
@@ -42,10 +44,10 @@ import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import java.io.StringReader;
-
-import static java.lang.String.format;
-import static org.testng.Assert.*;
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Iterables;
 
 public class ScriptHelperIntegrationTest extends BrooklynAppLiveTestSupport
 {
@@ -54,14 +56,25 @@ public class ScriptHelperIntegrationTest extends BrooklynAppLiveTestSupport
     private Location loc;
 
     @BeforeMethod(alwaysRun=true)
-    @SuppressWarnings("unchecked")
     @Override
     public void setUp() throws Exception {
         super.setUp();
         loc = app.getManagementContext().getLocationRegistry().getLocationManaged("localhost");
     }
 
-    @Test(groups = "Integration")
+//    Fails with:
+//    Message: SIGTERM should be tried one time expected [1] but found [16]
+//
+//        Stacktrace:
+//
+//        at org.testng.Assert.fail(Assert.java:94)
+//        at org.testng.Assert.failNotEquals(Assert.java:513)
+//        at org.testng.Assert.assertEqualsImpl(Assert.java:135)
+//        at org.testng.Assert.assertEquals(Assert.java:116)
+//        at org.testng.Assert.assertEquals(Assert.java:389)
+//        at org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelperIntegrationTest.testStopCommandWaitsToStopWithSigTerm(ScriptHelperIntegrationTest.java:83)
+//        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+    @Test(groups={"Integration","Broken"})
     public void testStopCommandWaitsToStopWithSigTerm() {
         StopCommandSoftwareProcess entity = app.createAndManageChild(EntitySpec.create(StopCommandSoftwareProcess.class, StopCommandSoftwareProcessImpl.class));
         entity.start(ImmutableList.of(loc));
@@ -88,8 +101,18 @@ public class ScriptHelperIntegrationTest extends BrooklynAppLiveTestSupport
         assertEquals(checkPidFileExitCode, 2, "pid file should be deleted.");
     }
 
-
-    @Test(groups = "Integration")
+//    Fails with:
+//    Exception java.lang.AssertionError
+//
+//    Message: null
+//
+//    Stacktrace:
+//
+//        at org.testng.Assert.fail(Assert.java:94)
+//        at org.testng.Assert.assertNotEquals(Assert.java:832)
+//        at org.testng.Assert.assertNotEquals(Assert.java:837)
+//        at org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelperIntegrationTest.testStopWithSigtermIsKilledWithSigKill(ScriptHelperIntegrationTest.java:126)
+    @Test(groups={"Integration","Broken"})
     public void testStopWithSigtermIsKilledWithSigKill() {
         StopCommandSoftwareProcess entity = app.createAndManageChild(EntitySpec.create(StopCommandSoftwareProcess.class, StopCommandSoftwareProcessImpl.class));
         entity.start(ImmutableList.of(loc));
@@ -138,7 +161,9 @@ public class ScriptHelperIntegrationTest extends BrooklynAppLiveTestSupport
     }
 
     public static class VanillaSoftwareProcessSshDriver extends AbstractSoftwareProcessSshDriver {
-        public VanillaSoftwareProcessSshDriver(EntityLocal entity, SshMachineLocation machine) {
+        public VanillaSoftwareProcessSshDriver(
+                @SuppressWarnings("deprecation") org.apache.brooklyn.api.entity.EntityLocal entity,
+                SshMachineLocation machine) {
             super(entity, machine);
         }