[CORDA-2208]: NodeHandles hashcode attemps an RPC invocation. (#4217)

This commit is contained in:
Michele Sollecito
2018-11-12 13:50:10 +00:00
committed by GitHub
parent 2f833f589c
commit ac23fcdf24
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,21 @@
package net.corda.node.services.rpc
import net.corda.core.utilities.getOrThrow
import net.corda.testing.driver.DriverParameters
import net.corda.testing.driver.driver
import org.assertj.core.api.Assertions.assertThatCode
import org.junit.Test
class NodeHandleTests {
@Test
fun object_defined_functions_are_static_for_node_rpc_ops() {
driver(DriverParameters(startNodesInProcess = true)) {
val rpcClient = startNode().getOrThrow().rpc
assertThatCode { rpcClient.hashCode() }.doesNotThrowAnyException()
@Suppress("UnusedEquals")
assertThatCode { rpcClient == rpcClient }.doesNotThrowAnyException()
assertThatCode { rpcClient.toString() }.doesNotThrowAnyException()
}
}
}