.classpath
| 5
etc/greasemonkey/RHQ_login_monkey.user.js
| 31 ++
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
| 3
modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
| 9
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
| 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
| 42 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java
| 12
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java
| 31 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MeasurementTableView.java
| 14 -
modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
| 3
modules/enterprise/scripting/javascript/pom.xml
| 6
modules/enterprise/scripting/python/pom.xml
| 6
modules/enterprise/server/jar/pom.xml
| 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
| 1
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
| 19 -
modules/helpers/pom.xml
| 10
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
| 7
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
| 52 +++
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
| 20 +
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
| 8
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
| 11
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
| 20 -
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
| 20 -
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
| 22 -
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
| 22 -
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
| 10
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
| 10
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
| 137 +++++++---
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
| 8
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
| 69 +++++
modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
| 4
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
| 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
| 22 +
modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
| 6
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
| 8
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
| 2
modules/test-utils/pom.xml
| 11
pom.xml
| 51 +--
45 files changed, 526 insertions(+), 215 deletions(-)
New commits:
commit d885d28fd8b658ea4cacc0abd2812510504689fe
Merge: f013199 844f016
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Sun Nov 25 17:33:40 2012 -0800
Merge branch 'master' into d3-charts2
commit f013199a26910a0a264171a661f707924356c6e9
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Sun Nov 25 16:08:23 2012 -0800
Fixing date selection for graphing on dialog boxes.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java
index 368e6a5..9066002 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java
@@ -23,7 +23,6 @@ import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
-import java.util.TreeSet;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Alignment;
@@ -278,8 +277,17 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet {
ChartViewWindow window = new
ChartViewWindow(
recentMeasurementsContent
.extendLocatorId("ChartWindow"), title);
- D3GraphListView graphView =
D3GraphListView.createSingleGraph(extendLocatorId("D3Graphs"),
+ final D3GraphListView
graphView = D3GraphListView.createSingleGraph(extendLocatorId("D3Graphs"),
resourceComposite.getResource(), md.getId());
+
graphView.addSetButtonClickHandler(new ClickHandler()
+ {
+ @Override
+ public void
onClick(ClickEvent event)
+ {
+
graphView.redrawGraphs();
+
+ }
+ });
window.addItem(graphView);
window.show();
draw();
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java
index 5e6bd96..a0ce76e 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java
@@ -29,6 +29,7 @@ import java.util.TreeSet;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
import org.rhq.core.domain.measurement.DataType;
@@ -47,7 +48,7 @@ import
org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
* Build the View that shows the individual graph views for multi-graph
* views if just a resource is provided and single graph view if resource
- * and definitionId are provided.
+ * and measurement definitionId are provided.
*
* @author Mike Thompson
*/
@@ -69,34 +70,39 @@ public class D3GraphListView extends LocatableVLayout {
}
public static D3GraphListView createSingleGraph(String locatorId, Resource resource,
Integer measurementId) {
- TreeSet<Integer> defintionIds = new TreeSet<Integer>();
- defintionIds.add(measurementId);
- return new D3GraphListView(locatorId, resource, defintionIds);
+ TreeSet<Integer> definitionIds = new TreeSet<Integer>();
+ definitionIds.add(measurementId);
+ return new D3GraphListView(locatorId, resource, definitionIds);
}
private D3GraphListView(String locatorId, Resource resource, Set<Integer>
definitionIds) {
super(locatorId);
- measurementRangeEditor = new
UserPreferencesMeasurementRangeEditor(this.getLocatorId());
this.resource = resource;
- setOverflow(Overflow.AUTO);
+ commonConstructorSettings();
this.definitionIds = definitionIds;
}
private D3GraphListView(String locatorId, Resource resource) {
super(locatorId);
- measurementRangeEditor = new
UserPreferencesMeasurementRangeEditor(this.getLocatorId());
this.resource = resource;
- setOverflow(Overflow.AUTO);
+ commonConstructorSettings();
useSummaryData = true;
}
+ private void commonConstructorSettings(){
+ measurementRangeEditor = new
UserPreferencesMeasurementRangeEditor(this.getLocatorId());
+ setOverflow(Overflow.AUTO);
+ }
+
public void addSetButtonClickHandler(ClickHandler clickHandler) {
+ Log.debug("measurementRangeEditor "+measurementRangeEditor);
measurementRangeEditor.getSetButton().addClickHandler(clickHandler);
}
@Override
protected void onDraw() {
super.onDraw();
+ //Log.debug(" *** Invoking onDraw()");
destroyMembers();
@@ -107,10 +113,15 @@ public class D3GraphListView extends LocatableVLayout {
}
}
+
+ public void redrawGraphs(){
+ this.onDraw();
+ }
+
/**
* Build whatever graph metrics (MeasurementDefinitions) are defined for the
resource.
*/
- private void buildGraphs() {
+ public void buildGraphs() {
List<Long> startEndList = measurementRangeEditor.getBeginEndTimes();
final long startTime = startEndList.get(0);
final long endTime = startEndList.get(1);
@@ -206,7 +217,7 @@ public class D3GraphListView extends LocatableVLayout {
if (null != selectedDefinitionId) {
// single graph case
if (measurementId == selectedDefinitionId) {
- buildIndividualGraph(measurementDefinition,
measurement, 250);
+ buildIndividualGraph(measurementDefinition,
measurement, 160);
}
} else {
// multiple graph case
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MeasurementTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MeasurementTableView.java
index e4a722d..5c20886 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MeasurementTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MeasurementTableView.java
@@ -31,6 +31,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.events.CloseClickEvent;
import com.smartgwt.client.widgets.events.CloseClickHandler;
+import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
+import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
@@ -236,8 +238,16 @@ public class MeasurementTableView extends
Table<MeasurementTableDataSource> {
final ResourceComposite resourceComposite =
result.get(0);
ChartViewWindow window = new
ChartViewWindow(extendLocatorId("ChartWindow"), "");
-
window.addItem(D3GraphListView.createMultipleGraphs(extendLocatorId("D3Graphs"),
- resourceComposite.getResource(),
definitionIds));
+ final D3GraphListView graphListView =
D3GraphListView.createMultipleGraphs(extendLocatorId("D3Graphs"),
resourceComposite.getResource(), definitionIds);
+ graphListView.addSetButtonClickHandler(new
ClickHandler()
+ {
+ @Override
+ public void onClick(ClickEvent event)
+ {
+ graphListView.redrawGraphs();
+ }
+ });
+ window.addItem(graphListView);
window.show();
refreshTableInfo();
commit 844f016ee8b2608496d063c94f38461e997bcabe
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 23 17:18:35 2012 +0100
[BZ 879655] - Properly deactivate the resource instead of just calling the
component's stop() method when forcing reactivation of a started component.
This will ensure the PC can't enter an inconsistent state in the case the
stop() method fails.
diff --git
a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
index b3f7fa9..473b0d0 100644
---
a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
+++
b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
@@ -1614,7 +1614,10 @@ public class InventoryManager extends AgentService implements
ContainerService,
if (forceReinitialization) {
switch (state) {
case STARTED:
- component.stop();
+ if (log.isDebugEnabled()) {
+ log.debug("Forcing re-initialization of an already started
resource: " + resource);
+ }
+ deactivateResource(resource);
break;
case STARTING:
log.warn("Could not force initialization of component for
resource [" + resource.getId()
@@ -2037,7 +2040,7 @@ public class InventoryManager extends AgentService implements
ContainerService,
log.debug("Successfully deactivated resource with id ["
+ resource.getId() + "].");
}
} catch (Throwable t) {
- log.warn("Plugin Error: Failed to stop component for [" +
resource + "].");
+ log.warn("Plugin Error: Failed to stop component for [" +
resource + "].", t);
}
container.setResourceComponentState(ResourceComponentState.STOPPED);
commit 16f04c50bd9cffaed77c73338d5f31ffb0f9c451
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 23 17:12:43 2012 +0100
Improvements in Apache integration tests:
* improved logging
* randomization of used ports
* *WithoutSNMP tests don't use SNMP even after upgrade (makes the behavior more
understandable)
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
index 8f8cdb6..aebea53 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
@@ -102,9 +102,6 @@ public class UpgradeTestBase extends PluginContainerTest {
boolean testFailed = false;
try {
- LOG.debug("----------------------------------------------------------
Starting the upgrade test for: "
- + testId);
-
String[] configFiles =
Arrays.copyOf(testConfiguration.apacheConfigurationFiles,
testConfiguration.apacheConfigurationFiles.length + 1);
configFiles[testConfiguration.apacheConfigurationFiles.length] =
"/snmpd.conf";
@@ -114,7 +111,11 @@ public class UpgradeTestBase extends PluginContainerTest {
.withServerRoot(testConfiguration.serverRoot).withExePath(testConfiguration.binPath);
testConfiguration.beforeTestSetup(setup);
-
+
+ LOG.debug("----------------------------------------------------------
Starting the upgrade test for: "
+ + testId);
+ LOG.debug("Deployment configuration: " +
setup.getDeploymentConfig());
+
setup.setup();
testConfiguration.beforePluginContainerStart(setup);
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
index bc80898..02be42c 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
@@ -19,7 +19,6 @@
package org.rhq.plugins.apache.util;
-import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
@@ -33,7 +32,6 @@ import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
@@ -198,10 +196,40 @@ public class ApacheDeploymentUtil {
tokenReplacements.put(LISTEN4, address4 == null ? "" :
address4.toString(false, false));
}
}
+
+ @Override
+ public String toString() {
+ StringBuilder bld = new StringBuilder("VHost[");
+ if (address1 != null) {
+ bld.append(address1.toString()).append(", ");
+ }
+ if (address2 != null) {
+ bld.append(address2.toString()).append(", ");
+ }
+ if (address3 != null) {
+ bld.append(address3.toString()).append(", ");
+ }
+ if (address4 != null) {
+ bld.append(address4.toString()).append(", ");
+ }
+
+ String serverName = getServerName();
+ if (serverName != null) {
+ bld.append("serverName=").append(serverName).append(",
");
+ }
+
+ if (additionalDirectives != null) {
+ bld.append("with additional directives, ");
+ }
+
+ bld.replace(bld.length() - 2, bld.length(), "]");
+
+ return bld.toString();
+ }
}
public String serverRoot = null;
- public String documentRoot = "hdocs";
+ public String documentRoot = "htdocs";
public String snmpHost = "localhost";
public int snmpPort = 1610;
public final VHost mainServer = new VHost();
@@ -242,48 +270,69 @@ public class ApacheDeploymentUtil {
default: throw new IllegalArgumentException();
}
}
+
+ @Override
+ public String toString() {
+ return new
StringBuilder("DeploymentConfig[").append("mainServer=").append(mainServer).append(",
vhost1=")
+ .append(vhost1).append(",
vhost2=").append(vhost2).append(", vhost3=").append(vhost3)
+ .append(", vhost4=").append(vhost4).append(",
serverRoot=").append(serverRoot)
+ .append(", documentRoot=").append(documentRoot).append(",
snmpHost=").append(snmpHost)
+ .append(",
snmpPort=").append(snmpPort).append("]").toString();
+ }
}
public static void addDefaultVariables(Map<String, String> variables, String
prefix) {
InetAddress localhost = determineLocalhost();
- checkOrAddDefault(variables, "localhost", localhost.getHostName());
- checkOrAddDefault(variables, "localhost.ip",
localhost.getHostAddress());
- checkOrAddDefault(variables, "unresolvable.host",
"unreachable.host.com");
- checkOrAddDefault(variables, "port1", "11675");
- checkOrAddDefault(variables, "port2", "11676");
- checkOrAddDefault(variables, "port3", "11677");
- checkOrAddDefault(variables, "port4", "11678");
-
- if (prefix != null && !prefix.trim().isEmpty()) {
- prefix += ".";
- } else {
- prefix = "";
+ PortScout portScout = new PortScout();
+ try {
+ checkOrAddDefault(variables, "localhost",
localhost.getHostName());
+ checkOrAddDefault(variables, "localhost.ip",
localhost.getHostAddress());
+ checkOrAddDefault(variables, "unresolvable.host",
"unreachable.host.com");
+
+ checkOrAddDefault(variables, "port1",
getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port2",
getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port3",
getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port4",
getRandomFreePort(portScout));
+
+ if (prefix != null && !prefix.trim().isEmpty()) {
+ prefix += ".";
+ } else {
+ prefix = "";
+ }
+
+ checkOrAddDefault(variables, prefix + "snmp.port",
getRandomFreePort(portScout));
+
+ checkOrAddDefault(variables, prefix + "listen1",
"${port1}");
+ checkOrAddDefault(variables, prefix + "listen2",
"${port2}");
+ checkOrAddDefault(variables, prefix + "listen3",
"${port3}");
+ checkOrAddDefault(variables, prefix + "listen4",
"${port4}");
+
+ checkOrAddDefault(variables, prefix + "vhost1.servername",
"${localhost}:${port1}");
+ checkOrAddDefault(variables, prefix + "vhost1.urls", "${"
+ prefix + "vhost1.servername}");
+ checkOrAddDefault(variables, prefix +
"vhost1.servername.directive", "ServerName ${" + prefix
+ + "vhost1.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost2.servername",
"${localhost}:${port2}");
+ checkOrAddDefault(variables, prefix + "vhost2.urls", "${"
+ prefix + "vhost2.servername}");
+ checkOrAddDefault(variables, prefix +
"vhost2.servername.directive", "ServerName ${" + prefix
+ + "vhost2.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost3.servername",
"${localhost}:${port3}");
+ checkOrAddDefault(variables, prefix + "vhost3.urls", "${"
+ prefix + "vhost3.servername}");
+ checkOrAddDefault(variables, prefix +
"vhost3.servername.directive", "ServerName ${" + prefix
+ + "vhost3.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost4.servername",
"${localhost}:${port4}");
+ checkOrAddDefault(variables, prefix + "vhost4.urls", "${"
+ prefix + "vhost4.servername}");
+ checkOrAddDefault(variables, prefix +
"vhost4.servername.directive", "ServerName ${" + prefix
+ + "vhost4.servername}");
+ } finally {
+ try {
+ portScout.close();
+ } catch (IOException e) {
+ throw new IllegalStateException(e);
+ }
}
-
- checkOrAddDefault(variables, prefix + "listen1",
"${port1}");
- checkOrAddDefault(variables, prefix + "listen2",
"${port2}");
- checkOrAddDefault(variables, prefix + "listen3",
"${port3}");
- checkOrAddDefault(variables, prefix + "listen4",
"${port4}");
-
- checkOrAddDefault(variables, prefix + "vhost1.servername",
"${localhost}:${port1}");
- checkOrAddDefault(variables, prefix + "vhost1.urls", "${" +
prefix + "vhost1.servername}");
- checkOrAddDefault(variables, prefix + "vhost1.servername.directive",
"ServerName ${" + prefix
- + "vhost1.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost2.servername",
"${localhost}:${port2}");
- checkOrAddDefault(variables, prefix + "vhost2.urls", "${" +
prefix + "vhost2.servername}");
- checkOrAddDefault(variables, prefix + "vhost2.servername.directive",
"ServerName ${" + prefix
- + "vhost2.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost3.servername",
"${localhost}:${port3}");
- checkOrAddDefault(variables, prefix + "vhost3.urls", "${" +
prefix + "vhost3.servername}");
- checkOrAddDefault(variables, prefix + "vhost3.servername.directive",
"ServerName ${" + prefix
- + "vhost3.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost4.servername",
"${localhost}:${port4}");
- checkOrAddDefault(variables, prefix + "vhost4.urls", "${" +
prefix + "vhost4.servername}");
- checkOrAddDefault(variables, prefix + "vhost4.servername.directive",
"ServerName ${" + prefix
- + "vhost4.servername}");
}
private static void checkOrAddDefault(Map<String, String> map, String key,
String value) {
@@ -433,4 +482,12 @@ public class ApacheDeploymentUtil {
}
}
};
+
+ private static String getRandomFreePort(PortScout scout) throws IllegalStateException
{
+ try {
+ return Integer.toString(scout.getNextFreePort());
+ } catch (IOException e) {
+ throw new IllegalStateException("Failed to find a free port.", e);
+ }
+ }
}
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
new file mode 100644
index 0000000..3a33f09
--- /dev/null
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
@@ -0,0 +1,69 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.plugins.apache.util;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.SocketAddress;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Tries to find a series of free ports.
+ *
+ * The ports remain open until the {@link #close()} method is called.
+ *
+ * @author Lukas Krejci
+ */
+public class PortScout implements Closeable {
+
+ private Set<ServerSocket> activeSockets = new HashSet<ServerSocket>();
+
+ public int getNextFreePort() throws IOException {
+ ServerSocket s = new ServerSocket(0);
+ activeSockets.add(s);
+ return s.getLocalPort();
+ }
+
+ @Override
+ public void close() throws IOException {
+ String message = null;
+ for(ServerSocket s : activeSockets) {
+ SocketAddress addr = s.getLocalSocketAddress();
+ try {
+ s.close();
+ } catch (IOException e) {
+ if (message == null) {
+ message = "The following test sockets failed to close while
looking for free ports:\n";
+ }
+
+ message += addr.toString() + ": " + e.getMessage() +
",\n";
+ }
+ }
+
+ if (message != null) {
+ message = message.substring(0, message.length() - 2);
+
+ throw new IOException(message);
+ }
+ }
+}
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
index 008588f..70151b7 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
@@ -19,7 +19,7 @@
<param name="MaxBackupIndex" value="1000" />
<param name="MaxFileSize" value="50MB" />
<layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%-5p %d{dd-MM
HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
+ <param name="ConversionPattern" value="%-5p %d{dd-MM
HH:mm:ss,SSS} [%t] (%F:%M:%L) -%m%n"/>
</layout>
</appender>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
index 32f6477..10530b5 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
index d0dd8ac..cbb9d66 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue><!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
index d0dd8ac..1f97d99 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
index 32f6477..10530b5 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
index c3906be..987a9a0 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
index 716773a..8557de3 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
index 716773a..8557de3 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
index c3906be..987a9a0 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
+++
b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong
-->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index a07438d..2a2b839 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -292,7 +292,8 @@ public class ApacheServerComponent implements AugeasRHQComponent,
ResourceCompon
availPingTime = System.currentTimeMillis() - t1;
} else {
if (log.isDebugEnabled()) {
- log.debug("Trying to ping the server for availability through
SNMP.");
+ log.debug("Trying to ping the server for availability through
SNMP "
+ +
getSNMPAddressString(resourceContext.getPluginConfiguration()));
}
available = getSNMPSession().ping();
availPingTime = -1;
@@ -633,6 +634,14 @@ public class ApacheServerComponent implements AugeasRHQComponent,
ResourceCompon
return snmpSession;
}
+ private static String getSNMPAddressString(Configuration pluginConfig) {
+ String host =
pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_HOST).getStringValue();
+ String portString =
pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_PORT).getStringValue();
+ String community =
pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_COMMUNITY).getStringValue();
+
+ return host + ":" + portString + "/" + community;
+ }
+
/**
* Return the absolute path of this Apache server's server root (e.g.
"C:\Program Files\Apache Group\Apache2").
*
commit 8b0919aceedac820bcbd2beb9408b1795cc32c8d
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 17:00:07 2012 +0100
stuff to help debug the apache integration test failures.
diff --git a/modules/enterprise/scripting/javascript/pom.xml
b/modules/enterprise/scripting/javascript/pom.xml
index ab35acb..ee5e4ba 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -27,6 +27,10 @@
</dependency>
</dependencies>
+ <properties>
+ <failIfNoTests>true</failIfNoTests>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -61,7 +65,7 @@
-Djava.security.policy==${project.build.testOutputDirectory}/allow-all.policy</argLine>
<!-- This is important, because some of the tests try to exit
the JVM. -->
- <failIfNoTests>true</failIfNoTests>
+ <failIfNoTests>${failIfNoTests}</failIfNoTests>
</configuration>
</plugin>
</plugins>
diff --git a/modules/enterprise/scripting/python/pom.xml
b/modules/enterprise/scripting/python/pom.xml
index e4b3cfb..fc64086 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -10,6 +10,10 @@
<name>RHQ Python support</name>
<description>Provides RHQ scripting in Python using Jython</description>
+ <properties>
+ <failIfNoTests>true</failIfNoTests>
+ </properties>
+
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -60,7 +64,7 @@
-Djava.security.policy==${project.build.testOutputDirectory}/allow-all.policy</argLine>
<!-- This is important, because some of the tests try to exit
the JVM. -->
- <failIfNoTests>true</failIfNoTests>
+ <failIfNoTests>${failIfNoTests}</failIfNoTests>
</configuration>
</plugin>
</plugins>
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index 8ccef7f..a07438d 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -283,18 +283,31 @@ public class ApacheServerComponent implements AugeasRHQComponent,
ResourceCompon
boolean available;
try {
if (this.url != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Trying to ping the server for availability: " +
this.url);
+ }
long t1 = System.currentTimeMillis();
int timeout = PluginUtility.getAvailabilityFacetTimeout();
available = WWWUtils.isAvailable(this.url, timeout);
availPingTime = System.currentTimeMillis() - t1;
} else {
+ if (log.isDebugEnabled()) {
+ log.debug("Trying to ping the server for availability through
SNMP.");
+ }
available = getSNMPSession().ping();
availPingTime = -1;
}
} catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.debug("Exception while checking availability.", e);
+ }
available = false;
}
+ if (log.isDebugEnabled()) {
+ log.debug("Availability determined: " + (available ?
AvailabilityType.UP : AvailabilityType.DOWN));
+ }
+
return (available) ? AvailabilityType.UP : AvailabilityType.DOWN;
}
commit bed7fb96f03e50db87a8b9699846e6f51b24584a
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Fri Nov 23 11:37:42 2012 +0100
Fix Eclipse classpath file
GWT -> 2.5.0
joda-time was missing
diff --git a/.classpath b/.classpath
index e452825..e2d8841 100644
--- a/.classpath
+++ b/.classpath
@@ -269,8 +269,8 @@
<classpathentry exported="true" kind="var"
path="M2_REPO/jboss/web/jbossweb/2.0.1.GA/jbossweb-2.0.1.GA.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/libvirt/libvirt/0.4.1/libvirt-0.4.1.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/fedorahosted/cobbler/cobbler4j/0.1/cobbler4j-0.1.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar"/>
- <classpathentry exported="true" kind="var"
path="M2_REPO/com/google/gwt/gwt-dev/2.4.0/gwt-dev-2.4.0.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/com/smartgwt/smartgwt/3.0/smartgwt-3.0.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/com/googlecode/gflot/gflot/2.4.2/gflot-2.4.2.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/com/jcraft/jsch/0.1.29/jsch-0.1.29.jar"/>
@@ -316,5 +316,6 @@
<classpathentry exported="true" kind="var"
path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1-20120531.064118-1.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/byteman/byteman/1.2.1/byteman-1.2.1.jar"/>
<classpathentry kind="var"
path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1.1-20121031.024335-6.jar"/>
+ <classpathentry exported="true" kind="var"
path="M2_REPO/joda-time/joda-time/2.1/joda-time-2.1.jar"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
commit a819562f809b7ca59c4f9b39c779df7abdb84704
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 13:14:48 2012 +0100
Add more excludes for the mem pools
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
index 0bf2796..374748d 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
@@ -58,7 +58,9 @@ public class GenericJBossAS7PluginTest extends
AbstractJBossAS7PluginTest {
// are not exposed, it is normal that the server returns 'undefined' for
the value
// Note that those
excludedMetricNamesByType.put(new ResourceType("Memory Pool
Resource",PLUGIN_NAME, ResourceCategory.SERVICE,null),
- new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage"});
+ new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage",
+
"collection-usage-threshold-exceeded","collection-usage:committed","collection-usage:init",
+
"collection-usage:max","collection-usage:used","usage-threshold-count","usage-threshold-exceeded"});
assertAllNumericMetricsAndTraitsHaveNonNullValues(excludedMetricNamesByType);
}
commit 22e30a3ff434e1193ef84ce6fa0ae7eb0dc2cbec
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 11:41:25 2012 +0100
Make message more clear in case of failure.
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
index bb1eca2..130f7f3 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
@@ -100,7 +100,7 @@ public abstract class AbstractIntegrationTest {
assert node != null : "No result from upload - node was null";
assert node.has("outcome") : "No outcome from upload";
String outcome = node.get("outcome").getTextValue();
- assert outcome.equals("success") : "Upload was no success" +
outcome;
+ assert outcome.equals("success") : "Upload was no success, but:
[" + outcome + "]";
JsonNode resultNode = node.get("result");
return resultNode.get("BYTES_VALUE").getTextValue();
commit c9d13f6b1cc8745c11e047be4c55786a8b9ca16c
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 09:10:41 2012 +0100
Add some excluded metrics, as they may indeed return null.
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
index 2b7ec7a..0bf2796 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
@@ -23,6 +23,7 @@ import java.util.Map;
import org.testng.annotations.Test;
+import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.plugin.testutil.AbstractAgentPluginTest;
import org.rhq.modules.plugins.jbossas7.itest.domain.ManagedServerTest;
@@ -53,6 +54,11 @@ public class GenericJBossAS7PluginTest extends
AbstractJBossAS7PluginTest {
// It's normal for the "startTime" trait to be null for a Managed
Server that is down/disabled.
// It's normal for the "multicastAddress" trait to be null for a
Managed Server that is not configured for JGroups HA.
excludedMetricNamesByType.put(ManagedServerTest.RESOURCE_TYPE, new String[]
{"startTime", "multicastAddress"});
+ // Some memory pools do not expose those statistics (by default), so in case
they
+ // are not exposed, it is normal that the server returns 'undefined' for
the value
+ // Note that those
+ excludedMetricNamesByType.put(new ResourceType("Memory Pool
Resource",PLUGIN_NAME, ResourceCategory.SERVICE,null),
+ new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage"});
assertAllNumericMetricsAndTraitsHaveNonNullValues(excludedMetricNamesByType);
}
commit 94e78de367b5472188fcad8425b0e057f8d602af
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Nov 20 10:31:32 2012 +0100
Print the DB-url and user that is used to run the tests to make debugging easier.
diff --git
a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index 82af5e0..b57f661 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -24,6 +24,7 @@ package org.rhq.core.domain.test;
import java.io.File;
import java.net.URL;
+import java.sql.DatabaseMetaData;
import java.util.Date;
import java.util.Hashtable;
@@ -79,6 +80,7 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
deployer.start();
System.err.println("...... deployer started....");
+ printDbVersion();
} catch (Throwable t) {
// Catch RuntimeExceptions and Errors and dump their stack trace, because
Surefire will completely swallow them
// and throw a cryptic NPE (see
http://jira.codehaus.org/browse/SUREFIRE-157)!
@@ -100,6 +102,13 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
return lookupEntityManager();
}
+ private static void printDbVersion() throws Exception {
+ EntityManager em = lookupEntityManager();
+ DatabaseMetaData md = ((org.hibernate.ejb.EntityManagerImpl)
em).getSession().connection().getMetaData();
+ System.err.println(">>> Database url for testing is [" +
md.getURL() + "] with user [" + md.getUserName() + "] <<<");
+
+ }
+
public boolean isPostgres(EntityManager em) throws Exception {
return ((org.hibernate.ejb.EntityManagerImpl)
em).getSession().connection().getMetaData()
.getDatabaseProductName().toLowerCase().indexOf("postgres") >
-1;
commit fa0629bd6c85ddea66f782772a9e4b11fbdc78a0
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 18:41:14 2012 +0100
Recovering from the loss of ant as a transitive dep of cobertura in tests.
diff --git
a/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
b/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
index 01a38e6..b651629 100644
---
a/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
+++
b/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
@@ -22,13 +22,10 @@ package org.rhq.enterprise.clienapi;
import static org.testng.Assert.assertEquals;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.Reader;
import java.net.URI;
-import java.net.URL;
-import org.apache.tools.ant.filters.StringInputStream;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
diff --git a/modules/enterprise/server/jar/pom.xml
b/modules/enterprise/server/jar/pom.xml
index 06a6e69..18ff9d4 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -571,6 +571,12 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
commit 5d2732fd7f4b2c11e81962dc95584a3f0801fab1
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 17:26:11 2012 +0100
Removing last remnants of cobertura from the poms.
diff --git a/modules/helpers/pom.xml b/modules/helpers/pom.xml
index e036910..20f1f76 100644
--- a/modules/helpers/pom.xml
+++ b/modules/helpers/pom.xml
@@ -16,16 +16,6 @@
<name>RHQ Helpers</name>
<description>parent POM for all RHQ helpers</description>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-
<modules>
<module>rtfilter</module>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 2525960..a04cf92 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -40,12 +40,6 @@
<artifactId>commons-beanutils</artifactId>
<version>1.8.2</version>
</dependency>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.unitils</groupId>
<artifactId>unitils-dbunit</artifactId>
@@ -70,6 +64,11 @@
using the version that we use else where.
jsanda 10/20/2010
+
+ Cobertura is not used anymore so no ASM clashes should
+ be present. We still maintain this exclusion though
+ to force the usage of "our" version of Hibernate.
+ lkrejci 2012-11-21
-->
<exclusion>
<groupId>org.hibernate</groupId>
diff --git a/pom.xml b/pom.xml
index cefbe69..f8b3811 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,7 +100,6 @@
<twitter4j.version>2.2.4</twitter4j.version>
<commons-codec.version>1.4</commons-codec.version>
<testng.version>6.5.2</testng.version>
- <cobertura.version>1.9.4.1</cobertura.version>
<augeas.version>0.9.0</augeas.version>
<augeas.classifier>el5</augeas.classifier>
<augeas.zip.version>0.9.0</augeas.zip.version>
@@ -567,13 +566,6 @@
</dependency>
<!-- end of workaround -->
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
-
</dependencies>
commit e2b304be7cc59a0e4cf331b1f8506bf8d2f9eb56
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 16:07:30 2012 +0100
Fixing the incorrect assertions in the ApplicationServerComponentTest in AS5
integration tests.
diff --git
a/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
b/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
index 6d60b85..effc856 100644
---
a/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
+++
b/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
@@ -23,9 +23,9 @@
package org.rhq.plugins.jbossas5.itest;
import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
import java.io.File;
import java.util.Arrays;
@@ -220,8 +220,8 @@ public class ApplicationServerComponentTest extends
AbstractJBossAS5PluginTest {
operationResult = invokeOperation(getServerResource(), SHUTDOWN_OPERATION_NAME,
null);
avail = getAvailability(getServerResource());
assertEquals(avail, AvailabilityType.DOWN);
- assertNull(operationResult.getErrorMessage());
- assertEquals(operationResult.getSimpleResult(), "The server has been shut
down.");
+ assertNotNull(operationResult.getErrorMessage());
+ assertNull(operationResult.getSimpleResult());
// Before restarting it, add some stuff to the 'startScriptEnv' and
'startScriptArgs' props so we can verify
// they are used correctly by the Start op.
commit 2ae8bc1158dcae4457a738a7414e3c71fd898ed0
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Tue Nov 20 15:17:34 2012 +0100
[BZ 850818 - Globally uncaught exception on clicking OK button while adding CLI Script
alert notification to the alert definition] Another possible scenario where NPE was thrown
was fixed by this commit.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
index b212043..1d55350 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
@@ -140,8 +140,8 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
protected List<FormItem> getOnDrawItems() {
List<FormItem> items = super.getOnDrawItems();
- TextItem version = new TextItem("editableVersion", MSG
-
.view_alert_definition_notification_cliScript_editor_newScriptVersion());
+ TextItem version = new TextItem("editableVersion",
+
MSG.view_alert_definition_notification_cliScript_editor_newScriptVersion());
version.setColSpan(getNumCols());
version.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
@@ -179,8 +179,9 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
}
};
- private boolean formBuilt;
+ private static String FAILED_LAST_TIME = "failed";
+ private boolean formBuilt;
private SelectItem repoSelector;
private RadioGroupWithComponentsItem packageSelector;
private SelectItem existingPackageSelector;
@@ -227,8 +228,8 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
SectionItem userSection = new SectionItem("userSection");
userSection.setDefaultValue(MSG.view_alert_definition_notification_cliScript_editor_whichUser());
- repoSelector = new
SortedSelectItem(extendLocatorId("repoSelector"), MSG
-
.view_alert_definition_notification_cliScript_editor_selectRepo());
+ repoSelector = new
SortedSelectItem(extendLocatorId("repoSelector"),
+
MSG.view_alert_definition_notification_cliScript_editor_selectRepo());
repoSelector.setDefaultToFirstOption(true);
repoSelector.setWrapTitle(false);
repoSelector.setWidth(400);
@@ -404,10 +405,19 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
private void validatePackage(final AsyncCallback<Void> callback) {
if (config.selectedRepo == null) {
- repoSelector.setIcons(failureIcon);
+ setFailed(repoSelector);
callback.onFailure(null);
return;
}
+ setOk(repoSelector);
+ if (!existingPackageSelector.isDisabled()) {
+ if (config.selectedPackage == null) {
+ setFailed(existingPackageSelector);
+ callback.onFailure(null);
+ return;
+ }
+ setOk(existingPackageSelector);
+ }
getConfiguration().put(new PropertySimple(PROP_REPO_ID,
config.selectedRepo.getId()));
if (packageSelector.getSelectedIndex() == 0) {
@@ -418,7 +428,8 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
if (cliScriptPackageType.getVersionFormat() != null) {
String versionRegex =
cliScriptPackageType.getVersionFormat().getFullFormatRegex();
if (versionRegex != null) {
- if
(!matches(uploadForm.getField("version").getValue().toString(), versionRegex))
{
+ Object version =
uploadForm.getField("version").getValue();
+ if (version == null ||!matches(version.toString(), versionRegex)) {
uploadForm.getItem("editableVersion").setIcons(failureIcon);
callback.onFailure(null);
return;
@@ -530,8 +541,8 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
form.setTitleOrientation(TitleOrientation.TOP);
anotherUserName = new TextItem("userName",
MSG.dataSource_users_field_name());
anotherUserPassword = new PasswordItem("password",
MSG.common_title_password());
- verifyUserButton = new ButtonItem("verify", MSG
-
.view_alert_definition_notification_cliScript_editor_verifyAuthentication());
+ verifyUserButton = new ButtonItem("verify",
+
MSG.view_alert_definition_notification_cliScript_editor_verifyAuthentication());
successIcon = new FormItemIcon();
successIcon.setSrc(ImageManager.getAvailabilityIcon(Boolean.TRUE));
@@ -680,6 +691,19 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
GWTServiceLookup.getContentService().findPackageType(null, PACKAGE_TYPE_NAME,
handler);
}
+ private void setFailed(FormItem item) {
+ item.setIcons(failureIcon);
+ item.setAttribute(FAILED_LAST_TIME, true);
+ }
+
+ private void setOk(FormItem item) {
+ Boolean lastTimeFail = item.getAttributeAsBoolean(FAILED_LAST_TIME);
+ if (lastTimeFail != null && lastTimeFail) {
+ item.setIcons(successIcon);
+ item.setAttribute(FAILED_LAST_TIME, false);
+ }
+ }
+
private void checkAuthenticationAndDo(final AsyncCallback<Void> action) {
String username = anotherUserName.getEnteredValue();
String password = anotherUserPassword.getEnteredValue();
commit 5028943b4989adb7fa0af99396bd604b6db889c5
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Tue Nov 20 13:38:45 2012 +0100
Greasemonkey script for FF for typing in the default credentials after pressing Alt +
C (can be used also in Chrome with Tampermonkey extension)
diff --git a/etc/greasemonkey/RHQ_login_monkey.user.js
b/etc/greasemonkey/RHQ_login_monkey.user.js
new file mode 100644
index 0000000..5c67125
--- /dev/null
+++ b/etc/greasemonkey/RHQ_login_monkey.user.js
@@ -0,0 +1,31 @@
+// ==UserScript==
+// @name RHQ login monkey
+// @namespace org.rhq.enterprise.gui.coregui
+// @description Types in the credentials
+// @include *:7080/coregui/*
+// @include *:7080/coregui/#LogOut
+// @grant none
+// @version 1
+// ==/UserScript==
+
+//GM_registerMenuCommand("Fill the credentials", function(e) {
+// fillTheCredentials();
+//}, "c", "alt", "c" );
+
+
+(function(){
+document.addEventListener('keydown', function(e) {
+ // pressed alt+c
+ if (e.keyCode == 67 && !e.shiftKey && !e.ctrlKey && e.altKey
&& !e.metaKey) {
+ fillTheCredentials();
+ }
+}, false);
+})();
+
+
+function fillTheCredentials() {
+ document.getElementsByName("user")[0].value="rhqadmin"
+ document.getElementsByName("password")[0].value="rhqadmin"
+ //document.forms[0].submit() don't work, SmartGWT uses internal logic
+ document.getElementsByName("password")[0].focus()
+}
commit 8ab939690aefbb6316aca6336c41804f728d290e
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Nov 19 17:49:07 2012 -0500
[Bug 878224 -Updated alert defs may not fire in an HA environment]
When setting the server status dirty to notify the need for global condition cache
refresh, update *all* servers. The global condition cache is supposed to be
replicated across HA servers. Otherwise, different servers will have different
condition sets generating unexpected results.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
index 09d5332..0ba8683 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
@@ -89,8 +89,7 @@ import org.rhq.core.domain.resource.Agent;
@NamedQuery(name = Server.QUERY_UPDATE_STATUS_BY_NAME, query = "" //
+ " UPDATE Server s " //
+ " SET s.status = -1 " // negative numbers so that bitmask strat
does not conflict with this one
- + " WHERE s.status = 0 " // we only need the first guy to set it
- + " AND s.name = :identity ") })
+ + " WHERE s.status = 0 ") })
@SequenceGenerator(name = "id", sequenceName = "RHQ_SERVER_ID_SEQ")
@Table(name = "RHQ_SERVER")
public class Server implements Serializable {
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
index 9658dd1..e84c979 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
@@ -188,7 +188,6 @@ public class StatusManagerBean implements StatusManagerLocal {
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public void markGlobalCache() {
Query updateServerQuery =
entityManager.createNamedQuery(Server.QUERY_UPDATE_STATUS_BY_NAME);
- updateServerQuery.setParameter("identity",
serverManager.getIdentity());
int serversUpdated = updateServerQuery.executeUpdate();
/*
commit 6c27b0e3a978a7642b9bcead40cb2eee0cec7265
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Nov 19 17:07:28 2012 +0100
Make the copied error logs really reflect the test they were collected for.
Also bumped up the number and size of the retained logs greatly, because
we collect A LOT of data in the debug mode, which is needed until we fix
the failures in the CI environment.
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
index 4a0f7b7..b1c8a24 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
@@ -168,7 +168,8 @@ public class AugeasReferenceLeakingTest extends BMNGRunner {
}
};
- setup = new ApacheTestSetup(this.getClass(), apacheConfig.configurationName,
+ setup = new ApacheTestSetup(this.getClass().getSimpleName()
+ + "#testReadingConfigurationsDoesNotLeakAugeasReferences",
apacheConfig.configurationName,
PluginContainerTest.getCurrentMockContext(),
new ResourceTypes(PluginLocation.APACHE_PLUGIN));
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
index 430f00a..9f12166 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
@@ -73,7 +73,7 @@ public class ApacheTestSetup {
private Map<String, String> inventoryFileReplacements;
private Mockery context;
private ResourceTypes apacheResourceTypes;
- private Class<?> testClass;
+ private String testId;
public class ApacheSetup {
private String serverRoot;
@@ -133,7 +133,7 @@ public class ApacheTestSetup {
File errorLog = new File(new File(new File(serverRoot), "logs"),
"error_log");
if (errorLog.exists() && errorLog.canRead()) {
- String copyName = testClass.getSimpleName() + "-" +
configurationName + ".httpd.error_log";
+ String copyName = testId + ".httpd.error_log";
FileUtil.copyFile(errorLog, new File(new File("target"),
copyName));
}
@@ -214,9 +214,9 @@ public class ApacheTestSetup {
}
}
- public ApacheTestSetup(Class<?> testClass, String configurationName, Mockery
context,
+ public ApacheTestSetup(String testId, String configurationName, Mockery context,
ResourceTypes apacheResourceTypes) {
- this.testClass = testClass;
+ this.testId = testId;
this.configurationName = configurationName;
this.context = context;
this.apacheResourceTypes = apacheResourceTypes;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
index 9180f2c..8f8cdb6 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
@@ -95,14 +95,15 @@ public class UpgradeTestBase extends PluginContainerTest {
platform = discoverPlatform();
}
- protected void testUpgrade(ApacheTestConfiguration testConfiguration) throws
Throwable {
- final ApacheTestSetup setup = new ApacheTestSetup(this.getClass(),
testConfiguration.configurationName,
- context, apacheResourceTypes);
+ protected void testUpgrade(String testMethod, ApacheTestConfiguration
testConfiguration) throws Throwable {
+ String testId = this.getClass().getSimpleName() + "#" + testMethod;
+ final ApacheTestSetup setup = new ApacheTestSetup(testId,
testConfiguration.configurationName, context,
+ apacheResourceTypes);
boolean testFailed = false;
try {
LOG.debug("----------------------------------------------------------
Starting the upgrade test for: "
- + this.getClass().getSimpleName() + ": " +
testConfiguration.configurationName);
+ + testId);
String[] configFiles =
Arrays.copyOf(testConfiguration.apacheConfigurationFiles,
testConfiguration.apacheConfigurationFiles.length + 1);
configFiles[testConfiguration.apacheConfigurationFiles.length] =
"/snmpd.conf";
@@ -203,7 +204,7 @@ public class UpgradeTestBase extends PluginContainerTest {
}
LOG.debug("----------------------------------------------------------
Finished the upgrade test for: "
- + this.getClass().getSimpleName() + ": " +
testConfiguration.configurationName);
+ + testId);
}
}
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
index 80efc67..9c1c921 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
@@ -58,7 +58,7 @@ public class UpgradeNestedConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
public void testWithResolvableServerNames(final String installPath, final String
exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableServerNames", new
ApacheTestConfiguration() {
{
serverRoot = installPath;
binPath = exePath;
@@ -94,7 +94,7 @@ public class UpgradeNestedConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN }, numberOfInitialDiscoveries =
2)
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueServerNames(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueServerNames", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_UNRESOLVABLE_SERVER_NAMES;
apacheConfigurationFiles = configuredApacheConfigurationFiles;
@@ -120,7 +120,7 @@ public class UpgradeNestedConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN}, numberOfInitialDiscoveries =
2)
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddress(final String installPath, final String exePath) throws
Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -148,7 +148,7 @@ public class UpgradeNestedConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddress(final String installPath, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
index 8788287..dfb78d1 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
@@ -59,7 +59,7 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
public void testWithResolvableServerNames_Apache2(final String installPath, final
String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableServerNames_Apache2", new
ApacheTestConfiguration() {
{
serverRoot = installPath;
binPath = exePath;
@@ -77,7 +77,8 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
public void testWithResolvableServerNames_Apache1(final String installPath, final
String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {{
+ testUpgrade("testWithResolvableServerNames_Apache1", new
ApacheTestConfiguration() {
+ {
serverRoot = installPath;
binPath = exePath;
configurationName = DEPLOYMENT_SIMPLE_WITH_RESOLVABLE_SERVERNAMES;
@@ -90,7 +91,7 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueServerNames_Apache2(final String installPath, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueServerNames_Apache2", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_UNRESOLVABLE_SERVER_NAMES;
apacheConfigurationFiles = configuredApacheConfigurationFiles;
@@ -113,7 +114,7 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddress(final String installPath, final String exePath) throws
Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -135,7 +136,7 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddress(final String installPath, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
index 3600fcd..99bea6e 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
@@ -66,7 +66,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN }, numberOfInitialDiscoveries =
2)
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -91,7 +91,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN }, numberOfInitialDiscoveries =
2)
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNamesWithoutSNMP(final String installDir, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -124,7 +124,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN }, numberOfInitialDiscoveries =
2)
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -168,7 +168,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -193,7 +193,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -229,7 +229,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -265,7 +265,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -296,7 +296,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithSNMP", new ApacheTestConfiguration()
{
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -328,7 +328,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -359,7 +359,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
index 9fceb54..916ed0f 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
@@ -73,7 +73,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN}, numberOfInitialDiscoveries =
2)
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -93,7 +93,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN}, numberOfInitialDiscoveries =
2)
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithoutSNMP(final String installDir, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -114,7 +114,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN}, numberOfInitialDiscoveries =
2)
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -146,7 +146,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -166,7 +166,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -192,7 +192,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -218,7 +218,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -257,7 +257,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithSNMP", new ApacheTestConfiguration()
{
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -284,7 +284,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -310,7 +310,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
index 97c1c35..5b5fddc 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
@@ -74,7 +74,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -99,7 +99,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -129,7 +129,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -160,7 +160,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNamesWithoutSNMP(final String installDir, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -199,7 +199,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -230,7 +230,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -287,7 +287,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testDuplicateMainVhostsMarkedAsFailedUpgrade(final String installDir,
final String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testDuplicateMainVhostsMarkedAsFailedUpgrade", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithDuplicateMain;
@@ -332,7 +332,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -383,7 +383,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithSNMP", new ApacheTestConfiguration()
{
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -415,7 +415,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -452,7 +452,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
index ffdc62d..16de715 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
@@ -74,7 +74,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -94,7 +94,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -139,7 +139,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -165,7 +165,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithoutSNMP(final String installDir, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -194,7 +194,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -220,7 +220,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -272,7 +272,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testDuplicateMainVhostsMarkedAsFailedUpgrade(final String installDir,
final String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testDuplicateMainVhostsMarkedAsFailedUpgrade", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithDuplicateMain;
@@ -317,7 +317,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -363,7 +363,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithSNMP", new ApacheTestConfiguration()
{
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -394,7 +394,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -445,7 +445,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
index e911667..9539bd2 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
@@ -62,7 +62,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNames", new ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFile;
@@ -82,7 +82,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNames", new ApacheTestConfiguration()
{
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFile;
@@ -113,7 +113,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNames", new ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSingleVHost;
@@ -144,7 +144,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddress(final String installPath, final String exePath) throws
Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -179,7 +179,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddress(final String installPath, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
index 3882f8f..0b1e7ac 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
@@ -61,7 +61,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNames", new ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFile;
@@ -76,7 +76,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNames", new ApacheTestConfiguration()
{
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFile;
@@ -102,7 +102,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNames", new ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSingleVhost;
@@ -128,7 +128,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddress(final String installPath, final String exePath) throws
Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -158,7 +158,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddress(final String installPath, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
index 56284ce..008588f 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
@@ -16,6 +16,8 @@
<param name="File" value="target/test.log"/>
<param name="Threshold" value="DEBUG"/>
<param name="Append" value="false"/>
+ <param name="MaxBackupIndex" value="1000" />
+ <param name="MaxFileSize" value="50MB" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p %d{dd-MM
HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
</layout>
commit 43724fc53d9c440a4ee9d86ea10d8146f95149fc
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Nov 19 13:33:12 2012 +0100
Backup the apache error logs on per-test-method basis.
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
index 58ac1fc..4a0f7b7 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
@@ -53,7 +53,6 @@ import org.rhq.plugins.apache.PluginLocation;
import org.rhq.plugins.apache.setup.ApacheTestConfiguration;
import org.rhq.plugins.apache.setup.ApacheTestSetup;
import org.rhq.plugins.apache.upgrade.UpgradeTestBase;
-import org.rhq.plugins.apache.util.ApacheExecutionUtil.ExpectedApacheState;
import org.rhq.plugins.apache.util.ResourceTypes;
import org.rhq.test.pc.PluginContainerSetup;
import org.rhq.test.pc.PluginContainerTest;
@@ -169,7 +168,8 @@ public class AugeasReferenceLeakingTest extends BMNGRunner {
}
};
- setup = new ApacheTestSetup(apacheConfig.configurationName,
PluginContainerTest.getCurrentMockContext(),
+ setup = new ApacheTestSetup(this.getClass(), apacheConfig.configurationName,
+ PluginContainerTest.getCurrentMockContext(),
new ResourceTypes(PluginLocation.APACHE_PLUGIN));
Resource platform = UpgradeTestBase.discoverPlatform();
@@ -186,7 +186,7 @@ public class AugeasReferenceLeakingTest extends BMNGRunner {
private void stopApache() throws Exception {
if (setup != null) {
-
setup.withApacheSetup().getExecutionUtil().invokeOperation(ExpectedApacheState.STOPPED,
"stop");
+ setup.withApacheSetup().stopApache();
setup = null;
}
}
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
index e27c394..430f00a 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
@@ -44,6 +44,8 @@ import org.rhq.core.domain.resource.ResourceError;
import org.rhq.core.pc.ServerServices;
import org.rhq.core.pc.upgrade.FakeServerInventory;
import org.rhq.core.system.SystemInfoFactory;
+import org.rhq.core.util.file.FileUtil;
+import org.rhq.plugins.apache.ApacheServerComponent;
import org.rhq.plugins.apache.ApacheServerDiscoveryComponent;
import org.rhq.plugins.apache.ApacheVirtualHostServiceComponent;
import org.rhq.plugins.apache.ApacheVirtualHostServiceDiscoveryComponent;
@@ -71,6 +73,7 @@ public class ApacheTestSetup {
private Map<String, String> inventoryFileReplacements;
private Mockery context;
private ResourceTypes apacheResourceTypes;
+ private Class<?> testClass;
public class ApacheSetup {
private String serverRoot;
@@ -115,6 +118,39 @@ public class ApacheTestSetup {
return this;
}
+ public void startApache() throws Exception {
+ //clear the error log
+ File errorLog = new File(new File(new File(serverRoot), "logs"),
"error_log");
+ errorLog.delete();
+
+ getExecutionUtil().invokeOperation(ExpectedApacheState.RUNNING,
"start");
+ }
+
+ public void stopApache() throws Exception {
+ getExecutionUtil().invokeOperation(ExpectedApacheState.STOPPED,
"stop");
+
+ //save a copy of the error log
+ File errorLog = new File(new File(new File(serverRoot), "logs"),
"error_log");
+
+ if (errorLog.exists() && errorLog.canRead()) {
+ String copyName = testClass.getSimpleName() + "-" +
configurationName + ".httpd.error_log";
+
+ FileUtil.copyFile(errorLog, new File(new File("target"),
copyName));
+ }
+ }
+
+ public void reloadApache() {
+
+ }
+
+ public ApacheServerComponent getServerComponent() {
+ return getExecutionUtil().getServerComponent();
+ }
+
+ public ApacheDirectiveTree getRuntimeConfiguration() {
+ return getExecutionUtil().getRuntimeConfiguration();
+ }
+
public ApacheExecutionUtil getExecutionUtil() {
return execution;
}
@@ -125,11 +161,15 @@ public class ApacheTestSetup {
assertTrue(serverRootDir.exists(), "The configured server root denotes a
non-existant directory: '"
+ serverRootDir + "'.");
+ File logsDir = new File(serverRootDir, "logs");
+
+ assertTrue(logsDir.exists(), "The configured server root denotes a
directory that doesn't have a 'logs' subdirectory. This is
unexpected.");
+
File confDir = new File(serverRootDir, "conf");
assertTrue(confDir.exists(),
"The configured server root denotes a directory that doesn't
have a 'conf' subdirectory. This is unexpected.");
-
+
String confFilePath = confDir.getAbsolutePath() + File.separatorChar +
"httpd.conf";
String snmpHost = null;
@@ -166,7 +206,7 @@ public class ApacheTestSetup {
private void doSetup() throws Exception {
init();
- execution.invokeOperation(ExpectedApacheState.RUNNING, "start");
+ startApache();
}
public ApacheTestSetup setup() throws Exception {
@@ -174,7 +214,9 @@ public class ApacheTestSetup {
}
}
- public ApacheTestSetup(String configurationName, Mockery context, ResourceTypes
apacheResourceTypes) {
+ public ApacheTestSetup(Class<?> testClass, String configurationName, Mockery
context,
+ ResourceTypes apacheResourceTypes) {
+ this.testClass = testClass;
this.configurationName = configurationName;
this.context = context;
this.apacheResourceTypes = apacheResourceTypes;
@@ -275,9 +317,9 @@ public class ApacheTestSetup {
ApacheDeploymentUtil.addDefaultVariables(replacements, null);
- HttpdAddressUtility addressUtility =
apacheSetup.getExecutionUtil().getServerComponent()
+ HttpdAddressUtility addressUtility = apacheSetup.getServerComponent()
.getAddressUtility();
- ApacheDirectiveTree runtimeConfig =
apacheSetup.getExecutionUtil().getRuntimeConfiguration();
+ ApacheDirectiveTree runtimeConfig = apacheSetup.getRuntimeConfiguration();
replacements.put("snmp.identifier",
addressUtility.getHttpdInternalMainServerAddressRepresentation(runtimeConfig).toString(false,
false));
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
index 8c0d2eb..9180f2c 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
@@ -62,7 +62,6 @@ import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
import org.rhq.plugins.apache.setup.ApacheTestConfiguration;
import org.rhq.plugins.apache.setup.ApacheTestSetup;
import org.rhq.plugins.apache.util.ApacheDeploymentUtil.DeploymentConfig;
-import org.rhq.plugins.apache.util.ApacheExecutionUtil.ExpectedApacheState;
import org.rhq.plugins.apache.util.ResourceTypes;
import org.rhq.plugins.apache.util.VHostSpec;
import org.rhq.plugins.apache.util.VirtualHostLegacyResourceKeyUtil;
@@ -97,7 +96,8 @@ public class UpgradeTestBase extends PluginContainerTest {
}
protected void testUpgrade(ApacheTestConfiguration testConfiguration) throws
Throwable {
- final ApacheTestSetup setup = new
ApacheTestSetup(testConfiguration.configurationName, context, apacheResourceTypes);
+ final ApacheTestSetup setup = new ApacheTestSetup(this.getClass(),
testConfiguration.configurationName,
+ context, apacheResourceTypes);
boolean testFailed = false;
try {
@@ -193,7 +193,7 @@ public class UpgradeTestBase extends PluginContainerTest {
throw t;
} finally {
try {
-
setup.withApacheSetup().getExecutionUtil().invokeOperation(ExpectedApacheState.STOPPED,
"stop");
+ setup.withApacheSetup().stopApache();
} catch (Exception e) {
if (testFailed) {
LOG.error("Failed to stop apache.", e);
@@ -209,7 +209,7 @@ public class UpgradeTestBase extends PluginContainerTest {
protected void defineRHQ3ResourceKeys(ApacheTestConfiguration testConfig,
ApacheTestSetup setup) throws Exception {
setup.withApacheSetup().init();
- ApacheServerComponent component =
setup.withApacheSetup().getExecutionUtil().getServerComponent();
+ ApacheServerComponent component = setup.withApacheSetup().getServerComponent();
ApacheDirectiveTree config = component.parseRuntimeConfiguration(false);
DeploymentConfig deployConfig = setup.getDeploymentConfig();
commit 7f44776f62d66f19332b6f9608ff93a8f8fddd7c
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Nov 19 12:52:42 2012 +0100
Slightly improving logging on apache upgrade tests.
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
index 62efbbe..8c0d2eb 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
@@ -101,6 +101,9 @@ public class UpgradeTestBase extends PluginContainerTest {
boolean testFailed = false;
try {
+ LOG.debug("----------------------------------------------------------
Starting the upgrade test for: "
+ + this.getClass().getSimpleName() + ": " +
testConfiguration.configurationName);
+
String[] configFiles =
Arrays.copyOf(testConfiguration.apacheConfigurationFiles,
testConfiguration.apacheConfigurationFiles.length + 1);
configFiles[testConfiguration.apacheConfigurationFiles.length] =
"/snmpd.conf";
@@ -198,6 +201,9 @@ public class UpgradeTestBase extends PluginContainerTest {
throw e;
}
}
+
+ LOG.debug("----------------------------------------------------------
Finished the upgrade test for: "
+ + this.getClass().getSimpleName() + ": " +
testConfiguration.configurationName);
}
}
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
index ba6df54..64ab1c0 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
@@ -46,6 +46,7 @@ import org.rhq.core.pluginapi.inventory.PluginContainerDeployment;
import org.rhq.core.pluginapi.inventory.ProcessScanResult;
import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.core.system.ProcessInfo;
import org.rhq.core.system.SystemInfo;
import org.rhq.core.system.SystemInfoFactory;
@@ -179,8 +180,13 @@ public class ApacheExecutionUtil {
public void invokeOperation(ExpectedApacheState desiredState, String operation)
throws Exception {
int i = 0;
+
while (i < 10) {
- serverComponent.invokeOperation(operation, new Configuration());
+ OperationResult res = serverComponent.invokeOperation(operation, new
Configuration());
+
+ LOG.debug("Invoked operation '" + operation + "' on
" + resourceContext.getResourceKey() + " (waiting for "
+ + desiredState + "), attempt " + i + ": "
+ + res.getComplexResults().getMap().toString());
//wait for max 30s for the operation to "express" itself
int w = 0;
commit 23be83c54ea7c50393c99834bdb0a22136ecb42e
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Nov 19 12:01:12 2012 +0100
BZ 861239 - add a flush() so that getting the live availability works.
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index a016f8e..053d5c9 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -276,7 +276,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// make sure the user is authorized to delete this resource (which implies you
can delete all its children)
// TODO: There is a pretty good argument for this being replaced with
MANAGE_INVENTORY. It takes an
// inventory manager to import resources, so why not to remove them? But, since
no one has complained
- // we're timid about making a change that may hamstring existing setups.
+ // we're timid about making a change that may hamstring existing setups.
if (!authorizationManager.hasResourcePermission(user, Permission.DELETE_RESOURCE,
resourceId)) {
throw new PermissionException("You do not have permission to uninventory
resource [" + resourceId + "]");
}
@@ -371,8 +371,8 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
}
}
- // now remove the dommed agent. Call flush() to force out any problems with
agent removal
- // so that we can catch them and report a better exception.
+ // now remove the doomed agent. Call flush() to force out any problems with
agent removal
+ // so that we can catch them and report a better exception.
if (doomedAgent != null) {
agentManager.deleteAgent(doomedAgent);
entityManager.flush();
@@ -517,7 +517,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_2, // then delete the
config objects
PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_3, // then the history
objects wrapping those configs
AlertConditionLog.QUERY_DELETE_BY_RESOURCES, // Don't
- AlertConditionLog.QUERY_DELETE_BY_RESOURCES_BULK_DELETE, // alter
+ AlertConditionLog.QUERY_DELETE_BY_RESOURCES_BULK_DELETE, // alter
AlertNotificationLog.QUERY_DELETE_BY_RESOURCES, // the
Alert.QUERY_DELETE_BY_RESOURCES, // order
AlertCondition.QUERY_DELETE_BY_RESOURCES, // of
@@ -885,7 +885,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
/**
* Get the complete set of resource type Ids in the ancestries provided. This is
useful for
* being able to load all the types in advance of generating decoded values.
- *
+ *
* @return
*/
private HashSet<Integer> getAncestryTypeIds(Collection<String>
ancestries) {
@@ -2353,6 +2353,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
if (avail != null) {
results.setAvailabilityType(avail.getAvailabilityType());
}
+ entityManager.flush();
}
} catch (Throwable ignore) {
}
@@ -2637,7 +2638,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// make sure the user is authorized to disable this resource (which implies
you can disable all its children)
// TODO: this may require its own permission, but until someone needs it
we'll piggyback on DELETE, at least
- // that gives a resource-level permission option.
+ // that gives a resource-level permission option.
if (!authorizationManager.hasResourcePermission(subject,
Permission.DELETE_RESOURCE, resourceId)) {
throw new PermissionException("You do not have permission to disable
resource [" + resourceId + "]");
}
@@ -2680,7 +2681,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// Set the resources disabled via the standard mergeInventoryReport mechanism,
from the server service
// level. We do this for a few reasons:
// - The server service uses locking to ensure we don't conflict with an
actual report from the agent
- // - It ensure all necessary db modications take place, like avail history and
current avail
+ // - It ensure all necessary db modifications take place, like avail history and
current avail
// - It ensures that all ancillary avail change logic, like alerting, still
happens.
DiscoveryServerServiceImpl service = new DiscoveryServerServiceImpl();
for (AvailabilityReport report : reports.values()) {
@@ -2715,7 +2716,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// make sure the user is authorized to enable this resource (which implies
you can enable all its children)
// TODO: this may require its own permission, but until someone needs it
we'll piggyback on DELETE, at least
- // that gives a resource-level permission option.
+ // that gives a resource-level permission option.
if (!authorizationManager.hasResourcePermission(subject,
Permission.DELETE_RESOURCE, resourceId)) {
throw new PermissionException("You do not have permission to enable
resource [" + resourceId + "]");
}
@@ -2757,7 +2758,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// Set the resources disabled via the standard mergeInventoryReport mechanism,
from the server service
// level. We do this for a few reasons:
// - The server service uses locking to ensure we don't conflict with an
actual report from the agent
- // - It ensure all necessary db modications take place, like avail history and
current avail
+ // - It ensure all necessary db modifications take place, like avail history and
current avail
// - It ensures that all ancillary avail change logic, like alerting, still
happens.
DiscoveryServerServiceImpl service = new DiscoveryServerServiceImpl();
for (AvailabilityReport report : reports.values()) {
commit 4a93caa8696e880fb0ce8c961cf98402b4a2827b
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Nov 19 10:43:39 2012 +0100
Add Thomas as developer and mark Ian as retired
diff --git a/pom.xml b/pom.xml
index eeaac9c..cefbe69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
<jboss-javassist.version>3.9.0.GA</jboss-javassist.version>
<jbossws-native-dist.version>3.1.1.GA</jbossws-native-dist.version>
<!-- End: JBoss AS Dependency Versions -->
-
+
<commons-logging.version>1.1.0.jboss</commons-logging.version>
<concurrent.version>1.3.4-jboss-update1</concurrent.version> <!--
oswego-concurrent compatible with 4.2.3.GA -->
<findbugs.version>2.3.2</findbugs.version>
@@ -118,7 +118,7 @@
Arquillian integration, and works with jacoco (as opposed to javassist 3.9.0,
which doesn't in some cases.) -->
<javassist.version>3.16.1-GA</javassist.version>
-
+
<rhq.db.admin.username>rhqadmin</rhq.db.admin.username>
<rhq.db.admin.password>rhqadmin</rhq.db.admin.password>
@@ -608,7 +608,7 @@
</exclusions>
</dependency>
</dependencies>
-
+
<executions>
<execution>
<id>pre-create target/classes</id>
@@ -774,7 +774,7 @@
</exclusions>
</configuration>
</plugin>
-
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
@@ -786,7 +786,7 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
</plugin>
- </plugins>
+ </plugins>
</pluginManagement>
@@ -1135,7 +1135,7 @@
</plugin>
</plugins>
- </build>
+ </build>
<repositories>
@@ -1234,7 +1234,7 @@
<jacoco.integration-test.args></jacoco.integration-test.args>
</properties>
</profile>
-
+
<profile>
<id>code-coverage</id>
<activation>
@@ -1263,7 +1263,7 @@
<include>org.rhq.*</include>
</includes>
</configuration>
- </execution>
+ </execution>
<execution>
<id>prepare-agent-for-integration-tests</id>
<phase>pre-integration-test</phase>
@@ -1399,7 +1399,7 @@
</plugins>
</build>
</profile>
-
+
<!-- NOTE: This profile is extended upon in several other submodules.
If you need to change its activation policy, make sure to do that in
*ALL* the modules that define this profile. -->
@@ -1409,16 +1409,16 @@
<property>
<!-- we want this always active but activeByDefault doesn't work
-->
<!-- see
http://maven.apache.org/guides/introduction/introduction-to-profiles.html -->
- <name>java.home</name>
+ <name>java.home</name>
</property>
</activation>
-
+
<!-- Can be used to pass a flag down to deployment composing ANT scripts and
somesuch -->
<properties>
<rhq.bundle-additional-script-languages>true</rhq.bundle-additional-script-languages>
- </properties>
+ </properties>
</profile>
-
+
<profile>
<id>ojdbc-driver</id>
<activation>
@@ -1617,7 +1617,7 @@
</configuration>
</plugin>
</plugins>
- </reporting>
+ </reporting>
</profile>
<profile>
@@ -1625,7 +1625,7 @@
<property>
<name>generate-dependency-graph</name>
<value>true</value>
- </property>
+ </property>
</activation>
<reporting>
@@ -1638,7 +1638,7 @@
</configuration>
</plugin>
</plugins>
- </reporting>
+ </reporting>
</profile>
</profiles>
@@ -1652,8 +1652,8 @@
<reportSet>
</reportSet>
</reportSets>
- </plugin>
-
+ </plugin>
+
<!--
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
@@ -1850,6 +1850,10 @@
</roles>
</developer>
<developer>
+ <name>Thomas Segismont</name>
+ <timezone>+1</timezone>
+ </developer>
+ <developer>
<name>Jay Shaughnessy</name>
<timezone>-5</timezone>
</developer>
@@ -1857,6 +1861,9 @@
<name>Ian Springer</name>
<timezone>-5</timezone>
<
url>http://freshjava.blogspot.com/</url>
+ <roles>
+ <role>retired</role>
+ </roles>
</developer>
<developer>
<name>Mike Thompson</name>