mirror of
https://github.com/corda/corda.git
synced 2025-01-30 16:14:39 +00:00
Minor: AuthDBTests - close RPC connections to prevent thread leaks
This commit is contained in:
parent
8b5ad9d5c0
commit
0a56c75543
@ -97,21 +97,21 @@ class AuthDBTests : NodeBasedTest() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `login with correct credentials`() {
|
fun `login with correct credentials`() {
|
||||||
client.start("user", "foo")
|
client.start("user", "foo").close()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `login with wrong credentials`() {
|
fun `login with wrong credentials`() {
|
||||||
client.start("user", "foo")
|
client.start("user", "foo").close()
|
||||||
assertFailsWith(
|
assertFailsWith(
|
||||||
ActiveMQSecurityException::class,
|
ActiveMQSecurityException::class,
|
||||||
"Login with incorrect password should fail") {
|
"Login with incorrect password should fail") {
|
||||||
client.start("user", "bar")
|
client.start("user", "bar").close()
|
||||||
}
|
}
|
||||||
assertFailsWith(
|
assertFailsWith(
|
||||||
ActiveMQSecurityException::class,
|
ActiveMQSecurityException::class,
|
||||||
"Login with unknown username should fail") {
|
"Login with unknown username should fail") {
|
||||||
client.start("X", "foo")
|
client.start("X", "foo").close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ class AuthDBTests : NodeBasedTest() {
|
|||||||
assertFailsWith(
|
assertFailsWith(
|
||||||
ActiveMQSecurityException::class,
|
ActiveMQSecurityException::class,
|
||||||
"Login with incorrect password should fail") {
|
"Login with incorrect password should fail") {
|
||||||
client.start("user2", "bar")
|
client.start("user2", "bar").close()
|
||||||
}
|
}
|
||||||
|
|
||||||
db.insert(UserAndRoles(
|
db.insert(UserAndRoles(
|
||||||
@ -161,7 +161,7 @@ class AuthDBTests : NodeBasedTest() {
|
|||||||
password = encodePassword("bar"),
|
password = encodePassword("bar"),
|
||||||
roles = listOf("default")))
|
roles = listOf("default")))
|
||||||
|
|
||||||
client.start("user2", "bar")
|
client.start("user2", "bar").close()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user