Update node/src/integration-test/kotlin/net/corda/node/jmx/NodeStatus.kt

Co-authored-by: Viktor Kolomeyko <viktor.kolomeyko@r3.com>
This commit is contained in:
Chris Cochrane 2022-06-08 16:01:43 +01:00 committed by GitHub
parent 0232146515
commit 4b1aabb164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,12 @@ class NodeStatusTest {
driver(DriverParameters(notarySpecs = emptyList(), jmxPolicy = JmxPolicy.defaultEnabled())) {
val jmxAddress = startNode().get().jmxAddress.toString()
val nodeStatusURL = URL("http://$jmxAddress/jolokia/read/net.corda:name=Status,type=Node")
var jmxInfo = ""
val jmxInfo = with(nodeStatusURL.openConnection() as HttpURLConnection) {
requestMethod = "GET"
inputStream.bufferedReader().use {
it.lines().collect(Collectors.toList()).joinToString()
}
}
with(nodeStatusURL.openConnection() as HttpURLConnection) {
requestMethod = "GET"