public abstract class AbstractITest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static ObjectName |
AGENT_MBEAN_OBJECT_NAME |
protected static File |
agentConfigFile |
protected static String |
agentJolokiaUri |
protected static String |
authentication |
protected static String |
baseGwUri |
protected static String |
baseInvUri |
protected static String |
baseMetricsUri |
protected static String |
hawkularAuthHeader |
protected static String |
hawkularFeedId |
protected static String |
hawkularHost |
protected static int |
hawkularHttpPort |
protected static int |
hawkularManagementPort |
protected static String |
hawkularTestPasword |
protected static String |
hawkularTestUser |
protected static String |
managementPasword |
protected static String |
managementUser |
protected static File |
plainWildFlyHome |
protected ITestHelper |
testHelper |
protected static Object |
waitForAccountsLock |
protected static Object |
waitForAgentLock |
| Constructor and Description |
|---|
AbstractITest() |
| Modifier and Type | Method and Description |
|---|---|
void |
after() |
protected void |
assertNodeAttributeEquals(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
String attribute,
String expectedValue) |
protected void |
assertNodeEquals(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode addressl,
Class<?> caller,
String expectedNodeFileName) |
protected void |
assertNodeEquals(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
Class<?> caller,
String expectedNodeFileName,
boolean saveActual) |
protected void |
assertNodeRegex(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
Class<?> caller,
String expectedNodeFileName,
boolean saveActual) |
protected void |
assertResourceCount(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
String childType,
int expectedCount) |
protected void |
assertResourceExists(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
boolean expectedExists) |
void |
before() |
protected Configuration |
getAgentConfigurationFromFile() |
protected org.jboss.dmr.ModelNode |
getDMRAgentInventoryReport(String host,
int managementPort) |
protected Collection<String> |
getDMRChildrenNames(String childTypeName,
org.jboss.as.controller.PathAddress parentAddress)
Gets a list of all DMR children names.
|
protected Collection<String> |
getDMRChildrenNames(WildFlyClientConfig wfConfig,
String childTypeName,
org.jboss.as.controller.PathAddress parentAddress)
Gets a list of all DMR children names.
|
protected org.hawkular.inventory.paths.CanonicalPath |
getHawkularWildFlyServerResourcePath()
Return the
CanonicalPath of the only WildFly server present in inventory under the hawkular feed. |
protected org.hawkular.inventory.paths.CanonicalPath |
getHostController()
Return the
CanonicalPath of the only WildFly Host Controller present in inventory under the feed
found in the given client config. |
protected com.fasterxml.jackson.databind.JsonNode |
getJMXAgentInventoryReport() |
protected String |
getNodeAttribute(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode addressActual,
String attributeName) |
protected static WildFlyClientConfig |
getPlainWildFlyClientConfig()
If a plain WildFly server was configured for the tests, this returns its data.
|
protected File |
getTestApplicationFile() |
protected static org.jboss.as.controller.client.ModelControllerClient |
newHawkularModelControllerClient() |
protected static org.jboss.as.controller.client.ModelControllerClient |
newModelControllerClient(String host,
int managementPort) |
protected static org.jboss.as.controller.client.ModelControllerClient |
newPlainWildFlyModelControllerClient(WildFlyClientConfig config) |
static String |
readNode(Class<?> caller,
String nodeFileName) |
protected void |
restartJMXAgent() |
protected boolean |
waitForAgent(org.jboss.as.controller.client.ModelControllerClient mcc)
Wait for an agent deployed in WildFly as a WildFly subsystem to start.
|
protected boolean |
waitForAgent(org.jboss.as.controller.client.ModelControllerClient mcc,
Address agentAddress) |
protected boolean |
waitForAgentViaJMX()
Wait for the agent deployed in JMX to start.
|
protected void |
waitForHawkularServerToBeReady() |
static void |
writeNode(Class<?> caller,
org.jboss.dmr.ModelNode node,
String nodeFileName) |
protected void |
writeNodeAttribute(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
String attribute,
Integer value) |
protected void |
writeNodeAttribute(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
String attribute,
String value) |
protected static final String hawkularHost
protected static final int hawkularHttpPort
protected static final int hawkularManagementPort
protected static final String hawkularAuthHeader
protected static final String authentication
protected static final String baseMetricsUri
protected static final String baseGwUri
protected static final String baseInvUri
protected static final String agentJolokiaUri
protected static final String managementUser
protected static final String managementPasword
protected static final String hawkularTestUser
protected static final String hawkularTestPasword
protected static final String hawkularFeedId
protected static final File agentConfigFile
protected static final Object waitForAccountsLock
protected static final Object waitForAgentLock
protected static final ObjectName AGENT_MBEAN_OBJECT_NAME
protected static final File plainWildFlyHome
protected ITestHelper testHelper
public static String readNode(Class<?> caller, String nodeFileName) throws IOException
IOExceptionpublic static void writeNode(Class<?> caller, org.jboss.dmr.ModelNode node, String nodeFileName) throws UnsupportedEncodingException, FileNotFoundException
public void before()
public void after()
protected String getNodeAttribute(org.jboss.as.controller.client.ModelControllerClient mcc, org.jboss.dmr.ModelNode addressActual, String attributeName)
protected void writeNodeAttribute(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
String attribute,
String value)
protected void writeNodeAttribute(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
String attribute,
Integer value)
protected void assertNodeAttributeEquals(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
String attribute,
String expectedValue)
protected void assertNodeEquals(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode addressl,
Class<?> caller,
String expectedNodeFileName)
protected void assertNodeEquals(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
Class<?> caller,
String expectedNodeFileName,
boolean saveActual)
protected void assertNodeRegex(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
Class<?> caller,
String expectedNodeFileName,
boolean saveActual)
protected void assertResourceCount(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
String childType,
int expectedCount)
throws IOException
IOExceptionprotected void assertResourceExists(org.jboss.as.controller.client.ModelControllerClient mcc,
org.jboss.dmr.ModelNode address,
boolean expectedExists)
throws IOException
IOExceptionprotected static WildFlyClientConfig getPlainWildFlyClientConfig()
protected static org.jboss.as.controller.client.ModelControllerClient newPlainWildFlyModelControllerClient(WildFlyClientConfig config)
getPlainWildFlyClientConfig()protected static org.jboss.as.controller.client.ModelControllerClient newHawkularModelControllerClient()
protected static org.jboss.as.controller.client.ModelControllerClient newModelControllerClient(String host, int managementPort)
protected Collection<String> getDMRChildrenNames(WildFlyClientConfig wfConfig, String childTypeName, org.jboss.as.controller.PathAddress parentAddress)
wfConfig - tells you what WildFly Server to query for the data (if null talks to the Hawkular Server)childTypeName - the DMR name of the child typeparentAddress - the parent whose children are to be returnedprotected Collection<String> getDMRChildrenNames(String childTypeName, org.jboss.as.controller.PathAddress parentAddress)
childTypeName - the DMR name of the child typeparentAddress - the parent whose children are to be returnedprotected void waitForHawkularServerToBeReady()
throws Throwable
Throwableprotected boolean waitForAgentViaJMX()
throws Throwable
Throwable - on errorprotected boolean waitForAgent(org.jboss.as.controller.client.ModelControllerClient mcc)
throws Throwable
mcc - used to connect to WildFlyThrowable - on errorprotected boolean waitForAgent(org.jboss.as.controller.client.ModelControllerClient mcc,
Address agentAddress)
throws Throwable
Throwableprotected org.jboss.dmr.ModelNode getDMRAgentInventoryReport(String host, int managementPort)
protected com.fasterxml.jackson.databind.JsonNode getJMXAgentInventoryReport()
protected void restartJMXAgent()
protected org.hawkular.inventory.paths.CanonicalPath getHawkularWildFlyServerResourcePath()
throws Throwable
CanonicalPath of the only WildFly server present in inventory under the hawkular feed.
This is the Hawkular Server itself.Throwableprotected org.hawkular.inventory.paths.CanonicalPath getHostController()
throws Throwable
CanonicalPath of the only WildFly Host Controller present in inventory under the feed
found in the given client config.Throwableprotected File getTestApplicationFile()
protected Configuration getAgentConfigurationFromFile() throws Exception
ExceptionCopyright © 2015–2017 Red Hat, Inc.. All rights reserved.