-
Bug
-
Resolution: Done
-
Major
-
None
-
None
This code fails with 2.3-redhat on EAP-6.4 but passes with 2.3 on wildfly-8.2
@Test
public void testAccessHawtIO() throws Exception {
URL url = new URL("http://localhost:8080/hawtio/jolokia/read/java.lang:type=Memory/HeapMemoryUsage/used");
URLConnection conn = url.openConnection();
try {
// Accessing hawtio requires an admin id/password.
String userpass = USERNAME + ":" + PASSWORD;
String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userpass.getBytes());
conn.setRequestProperty("Authorization", basicAuth);
int code = ((HttpURLConnection) conn).getResponseCode();
assertEquals(200, code);
String content = new String(readFully((InputStream) conn.getContent()), "UTF-8");
// Let check to see if it has some of the expected output.
assertTrue("Unexpected content: "+content, content.contains("\"mbean\":\"java.lang:type=Memory\""));
} finally {
try {
conn.getInputStream().close();
} catch (Throwable ignore) {
}
}
}
- is related to
-
ENTESB-2418 The 6.1 R1P1 Patch Breaks Jolokia URL
-
- Closed
-
-
ENTESB-3154 More generic solution for ENTESB-2418
-
- Closed
-