mirror of
https://github.com/corda/corda.git
synced 2024-12-20 05:28:21 +00:00
Remove dependencies from classpath in SIMM valuation integ test (#4603)
This commit is contained in:
parent
26cfea202b
commit
22f960fb8c
@ -38,21 +38,12 @@ class SimmValuationTest {
|
|||||||
const val testTradeId = "trade1"
|
const val testTradeId = "trade1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
|
||||||
fun setup() {
|
|
||||||
System.setProperty(AbstractAMQPSerializationScheme.SCAN_SPEC_PROP_NAME, CurrencyParameterSensitivitiesSerializer::class.packageName)
|
|
||||||
}
|
|
||||||
|
|
||||||
@After
|
|
||||||
fun tearDown() {
|
|
||||||
System.clearProperty(AbstractAMQPSerializationScheme.SCAN_SPEC_PROP_NAME)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `runs SIMM valuation demo`() {
|
fun `runs SIMM valuation demo`() {
|
||||||
val logConfigFile = projectRootDir / "samples" / "simm-valuation-demo" / "src" / "main" / "resources" / "log4j2.xml"
|
val logConfigFile = projectRootDir / "samples" / "simm-valuation-demo" / "src" / "main" / "resources" / "log4j2.xml"
|
||||||
assertThat(logConfigFile).isRegularFile()
|
assertThat(logConfigFile).isRegularFile()
|
||||||
driver(DriverParameters(isDebug = true,
|
driver(DriverParameters(isDebug = true,
|
||||||
|
startNodesInProcess = false, // starting nodes in separate processes to ensure system class path does not contain 3rd party libraries (masking serialization issues)
|
||||||
cordappsForAllNodes = listOf(findCordapp("net.corda.vega.flows"), findCordapp("net.corda.vega.contracts"), findCordapp("net.corda.confidential")) + FINANCE_CORDAPPS,
|
cordappsForAllNodes = listOf(findCordapp("net.corda.vega.flows"), findCordapp("net.corda.vega.contracts"), findCordapp("net.corda.confidential")) + FINANCE_CORDAPPS,
|
||||||
systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))
|
systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))
|
||||||
) {
|
) {
|
||||||
|
@ -768,9 +768,10 @@ class DriverDSLImpl(
|
|||||||
it += extraCmdLineFlag
|
it += extraCmdLineFlag
|
||||||
}.toList()
|
}.toList()
|
||||||
|
|
||||||
// This excludes the samples and the finance module from the system classpath of the out of process nodes
|
// The following dependencies are excluded from the classpath of the created JVM, so that the environment resembles a real one as close as possible.
|
||||||
// as they will be added to the cordapps folder.
|
// These are either classes that will be added as attachments to the node (i.e. samples, finance, opengamma etc.) or irrelevant testing libraries (test, corda-mock etc.).
|
||||||
val exclude = listOf("samples", "finance", "integrationTest", "test", "corda-mock")
|
// TODO: There is pending work to fix this issue without custom blacklisting. See: https://r3-cev.atlassian.net/browse/CORDA-2164.
|
||||||
|
val exclude = listOf("samples", "finance", "integrationTest", "test", "corda-mock", "com.opengamma.strata")
|
||||||
val cp = ProcessUtilities.defaultClassPath.filterNot { cpEntry ->
|
val cp = ProcessUtilities.defaultClassPath.filterNot { cpEntry ->
|
||||||
exclude.any { token -> cpEntry.contains("${File.separatorChar}$token") } || cpEntry.endsWith("-tests.jar")
|
exclude.any { token -> cpEntry.contains("${File.separatorChar}$token") } || cpEntry.endsWith("-tests.jar")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user