Disabled WindowsPerformanceCounterFeedLiveTest and fixed comment formatting


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

Branch: refs/heads/0.6.0
Commit: 9458604faab9c2d0f614acbea341651a720f1376
Parents: 76fadda
Author: Andrew Kennedy <[email protected]>
Authored: Tue Nov 12 16:55:28 2013 +0000
Committer: Andrew Kennedy <[email protected]>
Committed: Tue Nov 12 16:58:16 2013 +0000

----------------------------------------------------------------------
 .../WindowsPerformanceCounterFeedLiveTest.java  | 51 +++++++++++---------
 1 file changed, 29 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/9458604f/core/src/test/java/brooklyn/event/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/brooklyn/event/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
 
b/core/src/test/java/brooklyn/event/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
index 64e3620..d17e910 100644
--- 
a/core/src/test/java/brooklyn/event/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
+++ 
b/core/src/test/java/brooklyn/event/feed/windows/WindowsPerformanceCounterFeedLiveTest.java
@@ -1,5 +1,11 @@
 package brooklyn.event.feed.windows;
 
+import java.util.Map;
+
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
 import brooklyn.entity.basic.ApplicationBuilder;
 import brooklyn.entity.basic.Entities;
 import brooklyn.entity.basic.EntityInternal;
@@ -15,17 +21,31 @@ import brooklyn.test.EntityTestUtils;
 import brooklyn.test.entity.TestApplication;
 import brooklyn.test.entity.TestEntity;
 import brooklyn.util.collections.MutableMap;
+
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import java.util.Map;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
 
+/**
+ * WindowsPerformanceCounterFeed Live Test.
+ * <p>
+ * This test is currently disabled. To run, you must configure a location 
named {@code WindowsLiveTest}
+ * or adapt the {@link #LOCATION_SPEC} below.
+ * <p>
+ * The location must provide Windows nodes that are running an SSH server on 
port 22. The login credentials must
+ * be either be auto-detectable or configured in brooklyn.properties in the 
usual fashion.
+ * <p>
+ * Here is an example configuration from brooklyn.properties for a 
pre-configured Windows VM
+ * running an SSH server with public key authentication:
+ * <pre>
+ * {@code 
brooklyn.location.named.WindowsLiveTest=byon:(hosts="ec2-xx-xxx-xxx-xx.eu-west-1.compute.amazonaws.com")
+ * brooklyn.location.named.WindowsLiveTest.user=Administrator
+ * brooklyn.location.named.WindowsLiveTest.privateKeyFile = ~/.ssh/id_rsa
+ * brooklyn.location.named.WindowsLiveTest.publicKeyFile = ~/.ssh/id_rsa.pub
+ * }</pre>
+ * The location must by {@code byon} or another primitive type. Unfortunately, 
it's not possible to
+ * use a jclouds location, as adding a dependency on 
brooklyn-locations-jclouds would cause a
+ * cyclic dependency.
+ */
 public class WindowsPerformanceCounterFeedLiveTest {
 
     final static AttributeSensor<Double> CPU_IDLE_TIME =
@@ -33,19 +53,6 @@ public class WindowsPerformanceCounterFeedLiveTest {
     final static AttributeSensor<Integer> TELEPHONE_LINES =
             Sensors.newIntegerSensor("telephone.lines", "");
 
-    // To run this live test, you must configure a location named 
WindowsLiveTest, or adapt the LOCATION_SPEC below.
-    // The location must provide Windows nodes that are running an SSH server 
on port 22. The login credentials must
-    // be either be auto-detectable or configured in brooklyn.properties in 
the usual fashion.
-    //
-    // Here is an example configuration from brooklyn.properties for a 
pre-configured Windows VM
-    // running an SSH server with public key authentication:
-    //     
brooklyn.location.named.WindowsLiveTest=byon:(hosts="ec2-xx-xxx-xxx-xx.eu-west-1.compute.amazonaws.com")
-    //     brooklyn.location.named.WindowsLiveTest.user=Administrator
-    //     brooklyn.location.named.WindowsLiveTest.privateKeyFile = 
~/.ssh/id_rsa
-    //     brooklyn.location.named.WindowsLiveTest.publicKeyFile = 
~/.ssh/id_rsa.pub
-    // The location must by "byon" or another primitive type. Unfortunately, 
it's not possible to
-    // use a jclouds location, as adding a dependency on 
brooklyn-locations-jclouds would cause a
-    // cyclic dependency.
     private static final String LOCATION_SPEC = "named:WindowsLiveTest";
 
     private ManagementContext mgmt;
@@ -80,7 +87,7 @@ public class WindowsPerformanceCounterFeedLiveTest {
         mgmt = null;
     }
 
-    @Test(groups = {"Live"})
+    @Test(groups={"Live","Disabled"}, enabled=false)
     public void testRetrievesPerformanceCounters() throws Exception {
         // We can be pretty sure that a Windows instance in the cloud will 
have zero telephone lines...
         entity.setAttribute(TELEPHONE_LINES, 42);

Reply via email to