mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Merge remote-tracking branch 'origin/release/os/4.5' into adel/merge-from-4.5-17-Sept
This commit is contained in:
commit
01cd8d6415
@ -342,7 +342,7 @@ allprojects {
|
||||
}
|
||||
|
||||
tasks.withType(Test).configureEach {
|
||||
forkEvery = 10
|
||||
forkEvery = 20
|
||||
ignoreFailures = project.hasProperty('tests.ignoreFailures') ? project.property('tests.ignoreFailures').toBoolean() : false
|
||||
failFast = project.hasProperty('tests.failFast') ? project.property('tests.failFast').toBoolean() : false
|
||||
|
||||
|
@ -20,7 +20,7 @@ quasarVersion11=0.8.1_r3
|
||||
jdkClassifier11=jdk11
|
||||
proguardVersion=6.1.1
|
||||
bouncycastleVersion=1.66
|
||||
classgraphVersion=4.8.89
|
||||
classgraphVersion=4.8.90
|
||||
disruptorVersion=3.4.2
|
||||
typesafeConfigVersion=1.3.4
|
||||
jsr305Version=3.0.2
|
||||
|
@ -2,6 +2,7 @@ package net.corda.coretests.indentity
|
||||
|
||||
import com.google.common.jimfs.Configuration.unix
|
||||
import com.google.common.jimfs.Jimfs
|
||||
import net.corda.core.crypto.Crypto
|
||||
import net.corda.core.crypto.entropyToKeyPair
|
||||
import net.corda.core.identity.CordaX500Name
|
||||
import net.corda.core.identity.Party
|
||||
@ -14,6 +15,7 @@ import net.corda.testing.core.SerializationEnvironmentRule
|
||||
import net.corda.testing.core.getTestPartyAndCertificate
|
||||
import net.corda.coretesting.internal.DEV_ROOT_CA
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import java.math.BigInteger
|
||||
@ -24,6 +26,13 @@ class PartyAndCertificateTest {
|
||||
@JvmField
|
||||
val testSerialization = SerializationEnvironmentRule()
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
// Register providers before creating Jimfs filesystem. JimFs creates an SSHD instance which
|
||||
// register BouncyCastle and EdDSA provider separately, which wrecks havoc.
|
||||
Crypto.registerProviders()
|
||||
}
|
||||
|
||||
@Test(timeout=300_000)
|
||||
fun `reject a path with no roles`() {
|
||||
val path = X509Utilities.buildCertPath(DEV_ROOT_CA.certificate)
|
||||
|
@ -64,6 +64,8 @@ import org.junit.Test
|
||||
import rx.schedulers.TestScheduler
|
||||
import java.io.IOException
|
||||
import java.net.URL
|
||||
import java.nio.file.FileSystem
|
||||
import java.nio.file.Path
|
||||
import java.security.KeyPair
|
||||
import java.time.Instant
|
||||
import java.time.temporal.ChronoUnit
|
||||
@ -80,11 +82,12 @@ class NetworkMapUpdaterTest {
|
||||
val testSerialization = SerializationEnvironmentRule(true)
|
||||
private val cacheExpiryMs = 1000
|
||||
private val privateNetUUID = UUID.randomUUID()
|
||||
private val fs = Jimfs.newFileSystem(unix())
|
||||
private val baseDir = fs.getPath("/node")
|
||||
private val nodeInfoDir = baseDir / NODE_INFO_DIRECTORY
|
||||
private lateinit var fs: FileSystem
|
||||
private lateinit var baseDir: Path
|
||||
private val nodeInfoDir
|
||||
get() = baseDir / NODE_INFO_DIRECTORY
|
||||
private val scheduler = TestScheduler()
|
||||
private val fileWatcher = NodeInfoWatcher(baseDir, scheduler)
|
||||
private lateinit var fileWatcher: NodeInfoWatcher
|
||||
private val nodeReadyFuture = openFuture<Void?>()
|
||||
private val networkMapCache = createMockNetworkMapCache()
|
||||
private lateinit var ourKeyPair: KeyPair
|
||||
@ -96,6 +99,14 @@ class NetworkMapUpdaterTest {
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
// Register providers before creating Jimfs filesystem. JimFs creates an SSHD instance which
|
||||
// register BouncyCastle and EdDSA provider separately, which wrecks havoc.
|
||||
Crypto.registerProviders()
|
||||
|
||||
fs = Jimfs.newFileSystem(unix())
|
||||
baseDir = fs.getPath("/node")
|
||||
fileWatcher = NodeInfoWatcher(baseDir, scheduler)
|
||||
|
||||
ourKeyPair = Crypto.generateKeyPair(X509Utilities.DEFAULT_TLS_SIGNATURE_SCHEME)
|
||||
ourNodeInfo = createNodeInfoAndSigned("Our info", ourKeyPair).signed
|
||||
server = NetworkMapServer(cacheExpiryMs.millis)
|
||||
|
@ -3,6 +3,7 @@ package net.corda.node.services.network
|
||||
import com.google.common.jimfs.Configuration
|
||||
import com.google.common.jimfs.Jimfs
|
||||
import net.corda.core.identity.CordaX500Name
|
||||
import net.corda.core.crypto.Crypto
|
||||
import net.corda.core.internal.*
|
||||
import net.corda.core.serialization.deserialize
|
||||
import net.corda.core.utilities.days
|
||||
@ -37,7 +38,7 @@ class NetworkParametersReaderTest {
|
||||
@JvmField
|
||||
val testSerialization = SerializationEnvironmentRule(true)
|
||||
|
||||
private val fs: FileSystem = Jimfs.newFileSystem(Configuration.unix())
|
||||
private lateinit var fs: FileSystem
|
||||
private val cacheTimeout = 100000.seconds
|
||||
|
||||
private lateinit var server: NetworkMapServer
|
||||
@ -45,6 +46,11 @@ class NetworkParametersReaderTest {
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
// Register providers before creating Jimfs filesystem. JimFs creates an SSHD instance which
|
||||
// register BouncyCastle and EdDSA provider separately, which wrecks havoc.
|
||||
Crypto.registerProviders()
|
||||
|
||||
fs = Jimfs.newFileSystem(Configuration.unix())
|
||||
server = NetworkMapServer(cacheTimeout)
|
||||
val address = server.start()
|
||||
networkMapClient = NetworkMapClient(URL("http://$address"), VersionInfo(1, "TEST", "TEST", "TEST"))
|
||||
@ -112,3 +118,4 @@ class NetworkParametersReaderTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package net.corda.node.services.network
|
||||
|
||||
import com.google.common.jimfs.Configuration
|
||||
import com.google.common.jimfs.Jimfs
|
||||
import net.corda.core.crypto.Crypto
|
||||
import net.corda.core.internal.NODE_INFO_DIRECTORY
|
||||
import net.corda.core.internal.createDirectories
|
||||
import net.corda.core.internal.div
|
||||
@ -49,6 +50,10 @@ class NodeInfoWatcherTest {
|
||||
|
||||
@Before
|
||||
fun start() {
|
||||
// Register providers before creating Jimfs filesystem. JimFs creates an SSHD instance which
|
||||
// register BouncyCastle and EdDSA provider separately, which wrecks havoc.
|
||||
Crypto.registerProviders()
|
||||
|
||||
nodeInfoAndSigned = createNodeInfoAndSigned(ALICE_NAME)
|
||||
val identityService = makeTestIdentityService()
|
||||
keyManagementService = MockKeyManagementService(identityService)
|
||||
|
@ -7,6 +7,7 @@ import com.google.common.jimfs.Jimfs
|
||||
import com.nhaarman.mockito_kotlin.doReturn
|
||||
import com.nhaarman.mockito_kotlin.whenever
|
||||
import net.corda.core.contracts.ContractAttachment
|
||||
import net.corda.core.crypto.Crypto
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.sha256
|
||||
import net.corda.core.flows.FlowLogic
|
||||
@ -67,6 +68,10 @@ class NodeAttachmentServiceTest {
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
// Register providers before creating Jimfs filesystem. JimFs creates an SSHD instance which
|
||||
// register BouncyCastle and EdDSA provider separately, which wrecks havoc.
|
||||
Crypto.registerProviders()
|
||||
|
||||
LogHelper.setLevel(PersistentUniquenessProvider::class)
|
||||
|
||||
val dataSourceProperties = makeTestDataSourceProperties()
|
||||
@ -90,6 +95,7 @@ class NodeAttachmentServiceTest {
|
||||
@After
|
||||
fun tearDown() {
|
||||
database.close()
|
||||
fs.close()
|
||||
}
|
||||
|
||||
@Test(timeout=300_000)
|
||||
|
@ -41,6 +41,7 @@ import org.junit.Before
|
||||
import org.junit.Test
|
||||
import java.lang.IllegalStateException
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.FileSystem
|
||||
import java.security.PublicKey
|
||||
import java.security.cert.CertPathValidatorException
|
||||
import java.security.cert.X509Certificate
|
||||
@ -50,7 +51,7 @@ import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class NetworkRegistrationHelperTest {
|
||||
private val fs = Jimfs.newFileSystem(unix())
|
||||
private lateinit var fs: FileSystem
|
||||
private val nodeLegalName = ALICE_NAME
|
||||
|
||||
private lateinit var config: NodeConfiguration
|
||||
@ -59,6 +60,11 @@ class NetworkRegistrationHelperTest {
|
||||
|
||||
@Before
|
||||
fun init() {
|
||||
// Register providers before creating Jimfs filesystem. JimFs creates an SSHD instance which
|
||||
// register BouncyCastle and EdDSA provider separately, which wrecks havoc.
|
||||
Crypto.registerProviders()
|
||||
|
||||
fs = Jimfs.newFileSystem(unix())
|
||||
val baseDirectory = fs.getPath("/baseDir").createDirectories()
|
||||
|
||||
abstract class AbstractNodeConfiguration : NodeConfiguration
|
||||
|
Loading…
Reference in New Issue
Block a user