[ENT-2678]: PluginRegistrationTest.test plugin registration is failing (fix) (#1535)

This commit is contained in:
Michele Sollecito 2018-11-02 14:01:14 +00:00 committed by GitHub
parent ae8f26bd42
commit 6fb2996fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View File

@ -17,7 +17,6 @@ import java.io.RandomAccessFile
import java.lang.management.ManagementFactory
import java.net.InetAddress
import java.nio.file.Path
import java.util.*
class FirewallStartup: CordaCliWrapper("corda-firewall", "The Corda Firewall application for handling outbound and inbound connections to Corda.") {
companion object {
@ -158,10 +157,9 @@ class FirewallStartup: CordaCliWrapper("corda-firewall", "The Corda Firewall app
}
override fun initLogging() {
val loggingLevel = loggingLevel.name.toLowerCase(Locale.ENGLISH)
System.setProperty("defaultLogLevel", loggingLevel) // These properties are referenced from the XML config file.
System.setProperty("defaultLogLevel", specifiedLogLevel) // These properties are referenced from the XML config file.
if (verbose) {
System.setProperty("consoleLogLevel", loggingLevel)
System.setProperty("consoleLogLevel", specifiedLogLevel)
}
System.setProperty("log-path", (cmdLineOptions.baseDirectory / LOGS_DIRECTORY_NAME).toString())
SLF4JBridgeHandler.removeHandlersForRootLogger() // The default j.u.l config adds a ConsoleHandler.

View File

@ -5,15 +5,13 @@ import net.corda.core.internal.div
import net.corda.nodeapi.internal.config.User
import net.corda.smoketesting.NodeConfig
import net.corda.smoketesting.NodeProcess
import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.Ignore
import org.assertj.core.api.Assertions.assertThatCode
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
import java.io.FileOutputStream
import java.util.jar.JarOutputStream
class PluginRegistrationTest {
private companion object {
val pluginJarFile = PluginRegistrationTest::class.java.getResource("/dummydriver.jar")!!.path
@ -23,7 +21,6 @@ class PluginRegistrationTest {
@JvmField
val temporaryFolder = TemporaryFolder()
@Ignore
@Test
fun `test plugin registration` () {
// Create node jarDir with an empty jar file in it
@ -39,7 +36,7 @@ class PluginRegistrationTest {
jarDirs = listOf(jarDir))
// Check we do not have plugin on classpath
assertThatThrownBy({ Class.forName("net.corda.smoketesting.plugins.DummyJDBCDriver") })
assertThatCode { Class.forName("net.corda.smoketesting.plugins.DummyJDBCDriver") }.isInstanceOf(ClassNotFoundException::class.java)
// Install plugin Jars in node directory, then start the node and close it
val consoleOutput = temporaryFolder.newFile("node-stdout.txt")