From a4d63d13296f0a4e15379369cc529bbbd5f69cf8 Mon Sep 17 00:00:00 2001 From: Viktor Kolomeyko Date: Fri, 24 Jan 2020 16:57:31 +0000 Subject: [PATCH] CORDA-2942: Remove multiple reps from the test (#5893) ... as it is proven to be stable now. --- .../CordaServiceLifecycleFatalTests.kt | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/node/src/integration-test/kotlin/net/corda/node/services/CordaServiceLifecycleFatalTests.kt b/node/src/integration-test/kotlin/net/corda/node/services/CordaServiceLifecycleFatalTests.kt index 1a14828bac..daa2dba42b 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/CordaServiceLifecycleFatalTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/CordaServiceLifecycleFatalTests.kt @@ -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 } } }