mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
CORDA-2942: Remove multiple reps from the test (#5893)
... as it is proven to be stable now.
This commit is contained in:
parent
3027483b10
commit
a4d63d1329
@ -63,34 +63,29 @@ class CordaServiceLifecycleFatalTests {
|
||||
|
||||
@Test
|
||||
fun `JVM terminates on critical failure`() {
|
||||
(1..20).forEach {
|
||||
// Scenario terminates JVM - node should be running out of process
|
||||
driver(DriverParameters(startNodesInProcess = false, cordappsForAllNodes = listOf(enclosedCordapp()),
|
||||
notarySpecs = emptyList(),
|
||||
systemProperties = mapOf(SECRET_PROPERTY_NAME to "true", tempFilePropertyName to tmpFile.absolutePath))) {
|
||||
val nodeHandle = startNode(providedName = ALICE_NAME).getOrThrow()
|
||||
|
||||
logger.info("Rep #$it")
|
||||
val rpcInterface = nodeHandle.rpc
|
||||
eventually(duration = 60.seconds) {
|
||||
assertEquals(readyToThrowMarker, tmpFile.readLines().last())
|
||||
}
|
||||
|
||||
// Scenario terminates JVM - node should be running out of process
|
||||
driver(DriverParameters(startNodesInProcess = false, cordappsForAllNodes = listOf(enclosedCordapp()),
|
||||
notarySpecs = emptyList(),
|
||||
systemProperties = mapOf(SECRET_PROPERTY_NAME to "true", tempFilePropertyName to tmpFile.absolutePath))) {
|
||||
val nodeHandle = startNode(providedName = ALICE_NAME).getOrThrow()
|
||||
rpcInterface.protocolVersion
|
||||
|
||||
val rpcInterface = nodeHandle.rpc
|
||||
eventually(duration = 60.seconds) {
|
||||
assertEquals(readyToThrowMarker, tmpFile.readLines().last())
|
||||
}
|
||||
tmpFile.appendText("\n" + goodToThrowMarker)
|
||||
|
||||
rpcInterface.protocolVersion
|
||||
|
||||
tmpFile.appendText("\n" + goodToThrowMarker)
|
||||
|
||||
// We signalled that it is good to throw which will eventually trigger node shutdown and RPC interface no longer working.
|
||||
eventually(duration = 30.seconds) {
|
||||
assertFailsWith(Exception::class) {
|
||||
try {
|
||||
rpcInterface.protocolVersion
|
||||
} catch (ex: Exception) {
|
||||
logger.info("Thrown as expected", ex)
|
||||
throw ex
|
||||
}
|
||||
// We signalled that it is good to throw which will eventually trigger node shutdown and RPC interface no longer working.
|
||||
eventually(duration = 30.seconds) {
|
||||
assertFailsWith(Exception::class) {
|
||||
try {
|
||||
rpcInterface.protocolVersion
|
||||
} catch (ex: Exception) {
|
||||
logger.info("Thrown as expected", ex)
|
||||
throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user