Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/952#discussion_r42173152
--- Diff:
software/base/src/test/java/org/apache/brooklyn/entity/software/base/EmptySoftwareProcessStreamsLiveTest.java
---
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.entity.software.base;
+
+import com.google.common.base.Optional;
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import org.apache.brooklyn.api.entity.EntitySpec;
+import org.apache.brooklyn.api.location.Location;
+import org.apache.brooklyn.api.mgmt.HasTaskChildren;
+import org.apache.brooklyn.api.mgmt.Task;
+import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
+import org.apache.brooklyn.core.internal.BrooklynProperties;
+import org.apache.brooklyn.core.mgmt.BrooklynTaskTags;
+import org.apache.brooklyn.core.test.BrooklynAppLiveTestSupport;
+import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.core.test.entity.TestApplication;
+import org.apache.brooklyn.util.core.task.TaskPredicates;
+import org.apache.brooklyn.util.text.StringPredicates;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.util.Set;
+
+import static org.testng.Assert.assertNotEquals;
+
+public class EmptySoftwareProcessStreamsLiveTest extends
BrooklynAppLiveTestSupport {
+
+ private static final Logger LOG =
LoggerFactory.getLogger(EmptySoftwareProcessStreamsLiveTest.class);
+
+ protected BrooklynProperties brooklynProperties;
+
+ protected Location jcloudsLocation;
+
+ protected TestApplication app;
+
+ @BeforeMethod(alwaysRun=true)
+ public void setUp() throws Exception {
+
+ mgmt = new
LocalManagementContextForTests(BrooklynProperties.Factory.newDefault());
+
+ jcloudsLocation =
mgmt.getLocationRegistry().resolve("jclouds:aws-ec2:us-west-1",
ImmutableMap.<String, Object>builder()
+ .put("osFamily", "centos")
+ .put("osVersionRegex", "6\\..*")
+ .put("inboundPorts", ImmutableList.of(22, 31880, 31001,
8080, 8443, 1099))
+ .build());
+
+ app = ApplicationBuilder.newManagedApp(newAppSpec(), mgmt);
+ }
+
+ @Test(groups = "Live")
+ public void testGetsStreams() {
--- End diff --
The class name and test method name don't really describe what is being
tested - no-one would guess that it's just about openIptables from the name.
Also this is not just about `EmptySoftwareProcess` - it applies to all
`SoftwareProcess`es. We already have a
`VanillaSoftwareProcessStreamsIntegrationTest` - I wonder if we should add more
tests there, or whether we should have a new class like this. Not sure.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---