mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
ENT-11113 Fixed review comments
This commit is contained in:
parent
13e13fd236
commit
795e61807d
@ -330,7 +330,6 @@ jar {
|
||||
tasks.named('test', Test) {
|
||||
maxHeapSize = "3g"
|
||||
maxParallelForks = (System.env.CORDA_NODE_TESTING_FORKS == null) ? 1 : "$System.env.CORDA_NODE_TESTING_FORKS".toInteger()
|
||||
jvmArgs(['--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED', '--add-opens', 'java.base/java.util=ALL-UNNAMED'])
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
@ -68,17 +68,16 @@ class ConfigHelperTests {
|
||||
|
||||
@Test(timeout = 300_000)
|
||||
fun `bad keys are ignored and warned for`() {
|
||||
val outContent = ByteArrayOutputStream()
|
||||
val errContent = ByteArrayOutputStream()
|
||||
val originalOut = System.out
|
||||
val originalErr = System.err
|
||||
System.setOut(PrintStream(outContent));
|
||||
System.setErr(PrintStream(errContent));
|
||||
val config = loadConfig("corda_bad_key" to "2077")
|
||||
assertTrue(outContent.toString().contains("(property or environment variable) cannot be mapped to an existing Corda"))
|
||||
assertFalse(config?.hasPath("corda_bad_key") ?: true)
|
||||
System.setOut(originalOut);
|
||||
System.setErr(originalErr);
|
||||
try {
|
||||
val outContent = ByteArrayOutputStream()
|
||||
System.setOut(PrintStream(outContent));
|
||||
val config = loadConfig("corda_bad_key" to "2077")
|
||||
assertTrue(outContent.toString().contains("(property or environment variable) cannot be mapped to an existing Corda"))
|
||||
assertFalse(config?.hasPath("corda_bad_key") ?: true)
|
||||
} finally {
|
||||
System.setOut(originalOut);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user