ENT-11113 Fixed review comments

This commit is contained in:
Balwant Kothari 2024-01-18 00:34:59 +05:30
parent 13e13fd236
commit 795e61807d
No known key found for this signature in database
GPG Key ID: B88831D4B9E013F7
2 changed files with 9 additions and 11 deletions

View File

@ -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 {

View File

@ -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
try {
val outContent = ByteArrayOutputStream()
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)
} finally {
System.setOut(originalOut);
System.setErr(originalErr);
}
}
/**