[NOTICK] Add a detekt rule to catch tests with no timeout (#5959)

* [NOTICK] Add a custom detekt rule for tests with no timeout, and fix remaining missing timeouts

* [NOTICK] Add a test for custom detekt rules and tidying

* add timeout annotation to new test

Co-authored-by: Stefano Franz <roastario@gmail.com>
This commit is contained in:
James Higgs
2020-02-14 17:31:02 +00:00
committed by GitHub
parent 014a03575e
commit 3547b629c3
44 changed files with 248 additions and 82 deletions

View File

@ -264,7 +264,7 @@ class CordaRPCClientTest : NodeBasedTest(listOf("net.corda.finance"), notaries =
assertThat(outOfProcessRpc.waitFor()).isZero() // i.e. no exceptions were thrown
}
@Test
@Test(timeout=300_000)
fun `nonspecific reconnect errors dont trigger graceful reconnect`() {
val inputJar1 = Thread.currentThread().contextClassLoader.getResourceAsStream(testJar)!!
val inputJar2 = Thread.currentThread().contextClassLoader.getResourceAsStream(testJar)!!

View File

@ -72,7 +72,7 @@ class RpcCustomSerializersTest {
}
}
@Test
@Test(timeout=300_000)
fun `when a custom serializer is missing from the rpc client the resulting exception progagtes and client does not reconnect`() {
driver(DriverParameters(startNodesInProcess = false, cordappsForAllNodes = listOf(enclosedCordapp()))) {
val server = startNode(providedName = ALICE_NAME).get()