You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by dr...@apache.org on 2017/04/28 11:17:33 UTC
[2/5] brooklyn-server git commit: WindowsPerformanceCounterFeedTest:
code tidy
WindowsPerformanceCounterFeedTest: code tidy
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/a6457a6f
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/a6457a6f
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/a6457a6f
Branch: refs/heads/master
Commit: a6457a6f7afec0e1bb60a08582b001b0599cacfb
Parents: 9f8163f
Author: Aled Sage <al...@gmail.com>
Authored: Thu Apr 27 13:01:48 2017 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Thu Apr 27 13:03:23 2017 +0100
----------------------------------------------------------------------
.../windows/WindowsPerformanceCounterFeedTest.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a6457a6f/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedTest.java
----------------------------------------------------------------------
diff --git a/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedTest.java b/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedTest.java
index f77727e..5607a32 100644
--- a/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedTest.java
+++ b/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeedTest.java
@@ -26,7 +26,7 @@ import static org.testng.Assert.assertTrue;
import java.util.Collection;
import java.util.Iterator;
-import org.apache.brooklyn.api.entity.EntityLocal;
+import org.apache.brooklyn.api.entity.Entity;
import org.apache.brooklyn.api.entity.EntitySpec;
import org.apache.brooklyn.api.location.Location;
import org.apache.brooklyn.api.sensor.AttributeSensor;
@@ -48,8 +48,11 @@ import com.google.common.collect.ImmutableSet;
public class WindowsPerformanceCounterFeedTest extends BrooklynAppUnitTestSupport {
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(WindowsPerformanceCounterFeedTest.class);
+
private Location loc;
- private EntityLocal entity;
+ private Entity entity;
@BeforeMethod(alwaysRun=true)
@Override
@@ -66,8 +69,6 @@ public class WindowsPerformanceCounterFeedTest extends BrooklynAppUnitTestSuppor
super.tearDown();
}
- private static final Logger log = LoggerFactory.getLogger(WindowsPerformanceCounterFeedTest.class);
-
@Test
public void testIteratorWithSingleValue() {
Iterator<?> iterator = new WindowsPerformanceCounterFeed
@@ -95,9 +96,9 @@ public class WindowsPerformanceCounterFeedTest extends BrooklynAppUnitTestSuppor
AttributeSensor<Double> doubleSensor = Sensors.newDoubleSensor("baz.quux");
Collection<WindowsPerformanceCounterPollConfig<?>> polls = ImmutableSet.<WindowsPerformanceCounterPollConfig<?>>of(
- new WindowsPerformanceCounterPollConfig(stringSensor).performanceCounterName("\\processor information(_total)\\% processor time"),
- new WindowsPerformanceCounterPollConfig(integerSensor).performanceCounterName("\\integer.sensor"),
- new WindowsPerformanceCounterPollConfig(doubleSensor).performanceCounterName("\\double\\sensor\\with\\multiple\\sub\\paths")
+ new WindowsPerformanceCounterPollConfig<>(stringSensor).performanceCounterName("\\processor information(_total)\\% processor time"),
+ new WindowsPerformanceCounterPollConfig<>(integerSensor).performanceCounterName("\\integer.sensor"),
+ new WindowsPerformanceCounterPollConfig<>(doubleSensor).performanceCounterName("\\double\\sensor\\with\\multiple\\sub\\paths")
);
WindowsPerformanceCounterFeed.SendPerfCountersToSensors sendPerfCountersToSensors = new WindowsPerformanceCounterFeed.SendPerfCountersToSensors(entity, polls);