mirror of
https://github.com/corda/corda.git
synced 2025-06-14 13:18:18 +00:00
INFRA-424 CORDA-4058: Disable flaky tests on openj9 (#6774)
This commit is contained in:
2
.ci/dev/open-j9/Jenkinsfile
vendored
2
.ci/dev/open-j9/Jenkinsfile
vendored
@ -5,7 +5,7 @@ import static com.r3.build.BuildControl.killAllExistingBuildsForJob
|
|||||||
killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger())
|
killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger())
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'open-j9' }
|
agent { label 'open-j9 && os' }
|
||||||
options {
|
options {
|
||||||
timestamps()
|
timestamps()
|
||||||
timeout(time: 10, unit: 'HOURS')
|
timeout(time: 10, unit: 'HOURS')
|
||||||
|
@ -18,7 +18,7 @@ import net.corda.testing.core.BOB_NAME
|
|||||||
import net.corda.testing.core.singleIdentity
|
import net.corda.testing.core.singleIdentity
|
||||||
import net.corda.testing.driver.DriverParameters
|
import net.corda.testing.driver.DriverParameters
|
||||||
import net.corda.testing.driver.driver
|
import net.corda.testing.driver.driver
|
||||||
import net.corda.testing.internal.IS_OPENJ9
|
import net.corda.testing.internal.IS_S390X
|
||||||
import org.junit.Assume
|
import org.junit.Assume
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
@ -29,7 +29,7 @@ class FlowSleepTest {
|
|||||||
|
|
||||||
@Test(timeout = 300_000)
|
@Test(timeout = 300_000)
|
||||||
fun `flow can sleep`() {
|
fun `flow can sleep`() {
|
||||||
Assume.assumeTrue(!IS_OPENJ9)
|
Assume.assumeFalse(IS_S390X)
|
||||||
driver(DriverParameters(notarySpecs = emptyList(), startNodesInProcess = true)) {
|
driver(DriverParameters(notarySpecs = emptyList(), startNodesInProcess = true)) {
|
||||||
val alice = startNode(providedName = ALICE_NAME).getOrThrow()
|
val alice = startNode(providedName = ALICE_NAME).getOrThrow()
|
||||||
val (start, finish) = alice.rpc.startFlow(::SleepyFlow).returnValue.getOrThrow(1.minutes)
|
val (start, finish) = alice.rpc.startFlow(::SleepyFlow).returnValue.getOrThrow(1.minutes)
|
||||||
@ -41,6 +41,7 @@ class FlowSleepTest {
|
|||||||
|
|
||||||
@Test(timeout = 300_000)
|
@Test(timeout = 300_000)
|
||||||
fun `flow can sleep multiple times`() {
|
fun `flow can sleep multiple times`() {
|
||||||
|
Assume.assumeFalse(IS_S390X)
|
||||||
driver(DriverParameters(notarySpecs = emptyList(), startNodesInProcess = true)) {
|
driver(DriverParameters(notarySpecs = emptyList(), startNodesInProcess = true)) {
|
||||||
val alice = startNode(providedName = ALICE_NAME).getOrThrow()
|
val alice = startNode(providedName = ALICE_NAME).getOrThrow()
|
||||||
val (start, middle, finish) = alice.rpc.startFlow(::AnotherSleepyFlow).returnValue.getOrThrow(1.minutes)
|
val (start, middle, finish) = alice.rpc.startFlow(::AnotherSleepyFlow).returnValue.getOrThrow(1.minutes)
|
||||||
@ -55,7 +56,7 @@ class FlowSleepTest {
|
|||||||
|
|
||||||
@Test(timeout = 300_000)
|
@Test(timeout = 300_000)
|
||||||
fun `flow can sleep and perform other suspending functions`() {
|
fun `flow can sleep and perform other suspending functions`() {
|
||||||
Assume.assumeTrue(!IS_OPENJ9)
|
Assume.assumeFalse(IS_S390X)
|
||||||
// ensures that events received while the flow is sleeping are not processed
|
// ensures that events received while the flow is sleeping are not processed
|
||||||
driver(DriverParameters(notarySpecs = emptyList(), startNodesInProcess = true)) {
|
driver(DriverParameters(notarySpecs = emptyList(), startNodesInProcess = true)) {
|
||||||
val (alice, bob) = listOf(ALICE_NAME, BOB_NAME)
|
val (alice, bob) = listOf(ALICE_NAME, BOB_NAME)
|
||||||
|
@ -27,6 +27,7 @@ import org.bouncycastle.operator.ContentSigner
|
|||||||
import org.bouncycastle.pqc.jcajce.provider.sphincs.BCSphincs256PrivateKey
|
import org.bouncycastle.pqc.jcajce.provider.sphincs.BCSphincs256PrivateKey
|
||||||
import org.bouncycastle.pqc.jcajce.provider.sphincs.BCSphincs256PublicKey
|
import org.bouncycastle.pqc.jcajce.provider.sphincs.BCSphincs256PublicKey
|
||||||
import org.junit.Assert.assertNotEquals
|
import org.junit.Assert.assertNotEquals
|
||||||
|
import org.junit.Assume
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.math.BigInteger
|
import java.math.BigInteger
|
||||||
import java.security.KeyPairGenerator
|
import java.security.KeyPairGenerator
|
||||||
@ -934,6 +935,7 @@ class CryptoUtilsTest {
|
|||||||
|
|
||||||
@Test(timeout=300_000)
|
@Test(timeout=300_000)
|
||||||
fun `test default SecureRandom uses platformSecureRandom`() {
|
fun `test default SecureRandom uses platformSecureRandom`() {
|
||||||
|
Assume.assumeFalse(IS_OPENJ9) // See CORDA-4055
|
||||||
// Note than in Corda, [CordaSecurityProvider] is registered as the first provider.
|
// Note than in Corda, [CordaSecurityProvider] is registered as the first provider.
|
||||||
|
|
||||||
// Remove [CordaSecurityProvider] in case it is already registered.
|
// Remove [CordaSecurityProvider] in case it is already registered.
|
||||||
@ -953,4 +955,5 @@ class CryptoUtilsTest {
|
|||||||
val secureRandomRegisteredFirstCordaProvider = SecureRandom()
|
val secureRandomRegisteredFirstCordaProvider = SecureRandom()
|
||||||
assertEquals(PlatformSecureRandomService.algorithm, secureRandomRegisteredFirstCordaProvider.algorithm)
|
assertEquals(PlatformSecureRandomService.algorithm, secureRandomRegisteredFirstCordaProvider.algorithm)
|
||||||
}
|
}
|
||||||
|
private val IS_OPENJ9 = System.getProperty("java.vm.name").toLowerCase().contains("openj9")
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,13 @@ import net.corda.node.internal.NodeWithInfo
|
|||||||
import net.corda.node.services.Permissions
|
import net.corda.node.services.Permissions
|
||||||
import net.corda.node.services.config.PasswordEncryption
|
import net.corda.node.services.config.PasswordEncryption
|
||||||
import net.corda.testing.core.ALICE_NAME
|
import net.corda.testing.core.ALICE_NAME
|
||||||
|
import net.corda.testing.internal.IS_S390X
|
||||||
import net.corda.testing.node.internal.NodeBasedTest
|
import net.corda.testing.node.internal.NodeBasedTest
|
||||||
import net.corda.testing.node.internal.cordappForClasses
|
import net.corda.testing.node.internal.cordappForClasses
|
||||||
import org.apache.activemq.artemis.api.core.ActiveMQSecurityException
|
import org.apache.activemq.artemis.api.core.ActiveMQSecurityException
|
||||||
import org.apache.shiro.authc.credential.DefaultPasswordService
|
import org.apache.shiro.authc.credential.DefaultPasswordService
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
|
import org.junit.Assume
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
@ -173,6 +175,7 @@ class AuthDBTests : NodeBasedTest(cordappPackages = CORDAPPS) {
|
|||||||
|
|
||||||
@Test(timeout=300_000)
|
@Test(timeout=300_000)
|
||||||
fun `Modify user permissions during RPC session`() {
|
fun `Modify user permissions during RPC session`() {
|
||||||
|
Assume.assumeFalse(IS_S390X)
|
||||||
db.insert(UserAndRoles(
|
db.insert(UserAndRoles(
|
||||||
username = "user3",
|
username = "user3",
|
||||||
password = encodePassword("bar"),
|
password = encodePassword("bar"),
|
||||||
|
@ -22,10 +22,12 @@ import net.corda.testing.core.BOB_NAME
|
|||||||
import net.corda.testing.core.dummyCommand
|
import net.corda.testing.core.dummyCommand
|
||||||
import net.corda.testing.driver.DriverParameters
|
import net.corda.testing.driver.DriverParameters
|
||||||
import net.corda.testing.driver.driver
|
import net.corda.testing.driver.driver
|
||||||
|
import net.corda.testing.internal.IS_S390X
|
||||||
import net.corda.testing.node.User
|
import net.corda.testing.node.User
|
||||||
import net.corda.testing.node.internal.DUMMY_CONTRACTS_CORDAPP
|
import net.corda.testing.node.internal.DUMMY_CONTRACTS_CORDAPP
|
||||||
import net.corda.testing.node.internal.cordappWithPackages
|
import net.corda.testing.node.internal.cordappWithPackages
|
||||||
import net.corda.testing.node.internal.enclosedCordapp
|
import net.corda.testing.node.internal.enclosedCordapp
|
||||||
|
import org.junit.Assume
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.util.*
|
import java.util.*
|
||||||
@ -95,6 +97,7 @@ class ScheduledFlowIntegrationTests {
|
|||||||
|
|
||||||
@Test(timeout=300_000)
|
@Test(timeout=300_000)
|
||||||
fun `test that when states are being spent at the same time that schedules trigger everything is processed`() {
|
fun `test that when states are being spent at the same time that schedules trigger everything is processed`() {
|
||||||
|
Assume.assumeFalse(IS_S390X)
|
||||||
driver(DriverParameters(
|
driver(DriverParameters(
|
||||||
startNodesInProcess = false,
|
startNodesInProcess = false,
|
||||||
cordappsForAllNodes = listOf(DUMMY_CONTRACTS_CORDAPP, cordappWithPackages("net.corda.testMessage", "net.corda.testing.core"), enclosedCordapp())
|
cordappsForAllNodes = listOf(DUMMY_CONTRACTS_CORDAPP, cordappWithPackages("net.corda.testMessage", "net.corda.testing.core"), enclosedCordapp())
|
||||||
|
@ -20,6 +20,7 @@ import net.corda.testing.internal.configureDatabase
|
|||||||
import net.corda.coretesting.internal.doLookup
|
import net.corda.coretesting.internal.doLookup
|
||||||
import net.corda.coretesting.internal.rigorousMock
|
import net.corda.coretesting.internal.rigorousMock
|
||||||
import net.corda.coretesting.internal.spectator
|
import net.corda.coretesting.internal.spectator
|
||||||
|
import net.corda.testing.internal.IS_S390X
|
||||||
import net.corda.testing.node.MockServices
|
import net.corda.testing.node.MockServices
|
||||||
import net.corda.testing.node.TestClock
|
import net.corda.testing.node.TestClock
|
||||||
import org.junit.*
|
import org.junit.*
|
||||||
@ -294,6 +295,7 @@ class NodeSchedulerPersistenceTest : NodeSchedulerServiceTestBase() {
|
|||||||
|
|
||||||
@Test(timeout=300_000)
|
@Test(timeout=300_000)
|
||||||
fun `test that schedule is persisted`() {
|
fun `test that schedule is persisted`() {
|
||||||
|
Assume.assumeFalse(IS_S390X)
|
||||||
val dataSourceProps = MockServices.makeTestDataSourceProperties()
|
val dataSourceProps = MockServices.makeTestDataSourceProperties()
|
||||||
val timeInTheFuture = mark + 1.days
|
val timeInTheFuture = mark + 1.days
|
||||||
val stateRef = StateRef(SecureHash.zeroHash, 0)
|
val stateRef = StateRef(SecureHash.zeroHash, 0)
|
||||||
|
@ -254,4 +254,8 @@ fun isLocalPortBound(port: Int): Boolean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmField
|
||||||
val IS_OPENJ9 = System.getProperty("java.vm.name").toLowerCase().contains("openj9")
|
val IS_OPENJ9 = System.getProperty("java.vm.name").toLowerCase().contains("openj9")
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val IS_S390X = System.getProperty("os.arch") == "s390x"
|
Reference in New Issue
Block a user