Test rebind WindowsPerformanceCounterFeed
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/c526b308 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/c526b308 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/c526b308 Branch: refs/heads/master Commit: c526b308dd04d58cafc9c584a5d941163995000a Parents: 4905f3a Author: Valentin Aitken <[email protected]> Authored: Thu Jun 8 13:14:55 2017 +0300 Committer: Valentin Aitken <[email protected]> Committed: Thu Jun 8 13:20:08 2017 +0300 ---------------------------------------------------------------------- ...RebindWindowsPerformanceCounterFeedTest.java | 38 ++++++++++++ .../feed/windows/RebindWinrmCmdFeedTest.java | 4 +- ...-counter-feed-no-bundle-prefixies-ueauyeu41d | 61 ++++++++++++++++++++ .../windows-performance-counter-feed-tu4kk0xvf8 | 61 ++++++++++++++++++++ 4 files changed, 162 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c526b308/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWindowsPerformanceCounterFeedTest.java ---------------------------------------------------------------------- diff --git a/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWindowsPerformanceCounterFeedTest.java b/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWindowsPerformanceCounterFeedTest.java new file mode 100644 index 0000000..9549fd5 --- /dev/null +++ b/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWindowsPerformanceCounterFeedTest.java @@ -0,0 +1,38 @@ +/* + * 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.feed.windows; + +import org.apache.brooklyn.api.objs.BrooklynObjectType; +import org.apache.brooklyn.core.mgmt.rebind.RebindAbstractCommandFeedTest; +import org.testng.annotations.Test; + +public class RebindWindowsPerformanceCounterFeedTest extends RebindAbstractCommandFeedTest { + + @Test + public void testWindowsPerformanceCounterFeed_2017_06() throws Exception { + addMemento(BrooklynObjectType.FEED, "windows-performance-counter-feed", "tu4kk0xvf8"); + rebind(); + } + + @Test + public void testWindowsPerformanceCounterFeed_2017_06_withoutBundlePrefixes() throws Exception { + addMemento(BrooklynObjectType.FEED, "windows-performance-counter-feed-no-bundle-prefixies", "ueauyeu41d"); + rebind(); + } +} http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c526b308/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWinrmCmdFeedTest.java ---------------------------------------------------------------------- diff --git a/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWinrmCmdFeedTest.java b/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWinrmCmdFeedTest.java index cb63b39..70aed9b 100644 --- a/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWinrmCmdFeedTest.java +++ b/software/winrm/src/test/java/org/apache/brooklyn/feed/windows/RebindWinrmCmdFeedTest.java @@ -25,13 +25,13 @@ import org.testng.annotations.Test; public class RebindWinrmCmdFeedTest extends RebindAbstractCommandFeedTest { @Test - public void testSshFeed_2017_04() throws Exception { + public void testWinrmCmdFeed_2017_04() throws Exception { addMemento(BrooklynObjectType.FEED, "winrm-cmd-feed", "a8pno3muco"); rebind(); } @Test - public void testSshFeed_2017_04_withoutBundlePrefixes() throws Exception { + public void testWinrmCmdFeed_2017_04_withoutBundlePrefixes() throws Exception { addMemento(BrooklynObjectType.FEED, "winrm-cmd-feed-no-bundle-prefixes", "akc24nlh2k"); rebind(); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c526b308/software/winrm/src/test/resources/org/apache/brooklyn/feed/windows/windows-performance-counter-feed-no-bundle-prefixies-ueauyeu41d ---------------------------------------------------------------------- diff --git a/software/winrm/src/test/resources/org/apache/brooklyn/feed/windows/windows-performance-counter-feed-no-bundle-prefixies-ueauyeu41d b/software/winrm/src/test/resources/org/apache/brooklyn/feed/windows/windows-performance-counter-feed-no-bundle-prefixies-ueauyeu41d new file mode 100644 index 0000000..ceed339 --- /dev/null +++ b/software/winrm/src/test/resources/org/apache/brooklyn/feed/windows/windows-performance-counter-feed-no-bundle-prefixies-ueauyeu41d @@ -0,0 +1,61 @@ +<!-- +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. +--> +<feed> + <brooklynVersion>0.12.0-SNAPSHOT</brooklynVersion> + <type>org.apache.brooklyn.feed.windows.WindowsPerformanceCounterFeed</type> + <id>ueauyeu41d</id> + <displayName>org.apache.brooklyn.feed.windows.WindowsPerformanceCounterFeed</displayName> + <searchPath class="ImmutableList"/> + <tags> + <string>WindowsPerformanceCounterFeed[WindowsPerformanceCounterPollConfig[\Processor Information(_total....../f3c25627</string> + </tags> + <uniqueTag>WindowsPerformanceCounterFeed[WindowsPerformanceCounterPollConfig[\Processor Information(_total....../f3c25627</uniqueTag> + <config> + <polls> + <list> + <org.apache.brooklyn.feed.windows.WindowsPerformanceCounterPollConfig> + <sensor class="attributeSensor"> + <type>java.lang.String</type> + <name>percent.processor.time</name> + <description>% Processor Time</description> + <persistence>REQUIRED</persistence> + </sensor> + <onsuccess class="com.google.common.base.Functions$IdentityFunction">INSTANCE</onsuccess> + <suppressDuplicates>false</suppressDuplicates> + <enabled>true</enabled> + <period>30000</period> + <performanceCounterName>\Processor Information(_total)\% Processor Time</performanceCounterName> + </org.apache.brooklyn.feed.windows.WindowsPerformanceCounterPollConfig> + <org.apache.brooklyn.feed.windows.WindowsPerformanceCounterPollConfig> + <sensor class="attributeSensor"> + <type>java.lang.String</type> + <name>bytes.available</name> + <description>Bytes Available</description> + <persistence>REQUIRED</persistence> + </sensor> + <onsuccess class="com.google.common.base.Functions$IdentityFunction">INSTANCE</onsuccess> + <suppressDuplicates>false</suppressDuplicates> + <enabled>true</enabled> + <period>30000</period> + <performanceCounterName>\Memory\Available Bytes</performanceCounterName> + </org.apache.brooklyn.feed.windows.WindowsPerformanceCounterPollConfig> + </list> + </polls> + </config> +</feed> http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c526b308/software/winrm/src/test/resources/org/apache/brooklyn/feed/windows/windows-performance-counter-feed-tu4kk0xvf8 ---------------------------------------------------------------------- diff --git a/software/winrm/src/test/resources/org/apache/brooklyn/feed/windows/windows-performance-counter-feed-tu4kk0xvf8 b/software/winrm/src/test/resources/org/apache/brooklyn/feed/windows/windows-performance-counter-feed-tu4kk0xvf8 new file mode 100644 index 0000000..7811717 --- /dev/null +++ b/software/winrm/src/test/resources/org/apache/brooklyn/feed/windows/windows-performance-counter-feed-tu4kk0xvf8 @@ -0,0 +1,61 @@ +<!-- +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. +--> +<feed> + <brooklynVersion>0.12.0-SNAPSHOT</brooklynVersion> + <type>org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.WindowsPerformanceCounterFeed</type> + <id>tu4kk0xvf8</id> + <displayName>org.apache.brooklyn.feed.windows.WindowsPerformanceCounterFeed</displayName> + <searchPath class="ImmutableList"/> + <tags> + <string>WindowsPerformanceCounterFeed[WindowsPerformanceCounterPollConfig[\Processor Information(_total....../f3c25627</string> + </tags> + <uniqueTag>WindowsPerformanceCounterFeed[WindowsPerformanceCounterPollConfig[\Processor Information(_total....../f3c25627</uniqueTag> + <config> + <polls> + <list> + <org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.WindowsPerformanceCounterPollConfig> + <sensor class="attributeSensor"> + <type>java.lang.String</type> + <name>percent.processor.time</name> + <description>% Processor Time</description> + <persistence>REQUIRED</persistence> + </sensor> + <onsuccess class="com.google.guava:com.google.common.base.Functions$IdentityFunction">INSTANCE</onsuccess> + <suppressDuplicates>false</suppressDuplicates> + <enabled>true</enabled> + <period>30000</period> + <performanceCounterName>\Processor Information(_total)\% Processor Time</performanceCounterName> + </org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.WindowsPerformanceCounterPollConfig> + <org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.WindowsPerformanceCounterPollConfig> + <sensor class="attributeSensor"> + <type>java.lang.String</type> + <name>bytes.available</name> + <description>Bytes Available</description> + <persistence>REQUIRED</persistence> + </sensor> + <onsuccess class="com.google.guava:com.google.common.base.Functions$IdentityFunction">INSTANCE</onsuccess> + <suppressDuplicates>false</suppressDuplicates> + <enabled>true</enabled> + <period>30000</period> + <performanceCounterName>\Memory\Available Bytes</performanceCounterName> + </org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.WindowsPerformanceCounterPollConfig> + </list> + </polls> + </config> +</feed>
