mirror of
https://github.com/corda/corda.git
synced 2025-06-21 16:49:45 +00:00
Minor: address more formatting issues spotted by Shams
This commit is contained in:
@ -24,8 +24,7 @@ import org.junit.Before
|
||||
import java.util.*
|
||||
import java.util.concurrent.locks.ReentrantLock
|
||||
|
||||
abstract class AbstractClientRPC {
|
||||
|
||||
abstract class AbstractClientRPCTest {
|
||||
lateinit var artemis: EmbeddedActiveMQ
|
||||
lateinit var serverSession: ClientSession
|
||||
lateinit var clientSession: ClientSession
|
||||
@ -93,8 +92,10 @@ abstract class AbstractClientRPC {
|
||||
return CordaRPCClientImpl(clientSession, ReentrantLock(), rpcUser.username).proxyFor(type)
|
||||
}
|
||||
|
||||
fun safeClose(obj: Any) = try {
|
||||
(obj as AutoCloseable).close()
|
||||
} catch (e: Exception) {
|
||||
fun safeClose(obj: Any) {
|
||||
try {
|
||||
(obj as AutoCloseable).close()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@ import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFailsWith
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class ClientRPCInfrastructureTests : AbstractClientRPC() {
|
||||
class ClientRPCInfrastructureTests : AbstractClientRPCTest() {
|
||||
// TODO: Test that timeouts work
|
||||
|
||||
lateinit var proxy: TestOps
|
||||
|
@ -8,7 +8,7 @@ import org.junit.After
|
||||
import org.junit.Test
|
||||
import kotlin.test.assertFailsWith
|
||||
|
||||
class RPCPermissionsTest : AbstractClientRPC() {
|
||||
class RPCPermissionsTest : AbstractClientRPCTest() {
|
||||
companion object {
|
||||
const val DUMMY_FLOW = "StartFlow.net.corda.flows.DummyFlow"
|
||||
const val OTHER_FLOW = "StartFlow.net.corda.flows.OtherFlow"
|
||||
|
Reference in New Issue
Block a user