mirror of
https://github.com/corda/corda.git
synced 2025-06-23 09:25:36 +00:00
[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:
@ -664,7 +664,7 @@ class CryptoUtilsTest {
|
||||
assertFalse(Crypto.publicKeyOnCurve(EDDSA_ED25519_SHA512, EdDSAPublicKey(pubKeySpec)))
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
@Test(expected = IllegalArgumentException::class, timeout = 300_000)
|
||||
fun `Unsupported EC public key type on curve`() {
|
||||
val keyGen = KeyPairGenerator.getInstance("EC") // sun.security.ec.ECPublicKeyImpl
|
||||
keyGen.initialize(256, newSecureRandom())
|
||||
|
@ -69,7 +69,7 @@ class ClassLoadingUtilsTest {
|
||||
.doesNotContain(AbstractClass::class.java.name)
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
@Test(expected = IllegalArgumentException::class,timeout=300_000)
|
||||
fun throwsExceptionWhenClassDoesNotContainProperConstructors() {
|
||||
createInstancesOfClassesImplementing(BaseInterface::class.java.classLoader, BaseInterface2::class.java)
|
||||
}
|
||||
|
Reference in New Issue
Block a user