mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
Add support for database integration tests for DrainingMode tests (#607)
This commit is contained in:
parent
4558651b58
commit
7370e6272e
@ -37,6 +37,8 @@ object MessageSchemaV1 : MappedSchema(
|
|||||||
version = 1,
|
version = 1,
|
||||||
mappedTypes = listOf(PersistentMessage::class.java)) {
|
mappedTypes = listOf(PersistentMessage::class.java)) {
|
||||||
|
|
||||||
|
override val migrationResource = "message-schema.changelog-init"
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "messages")
|
@Table(name = "messages")
|
||||||
class PersistentMessage(
|
class PersistentMessage(
|
||||||
|
@ -25,21 +25,28 @@ import net.corda.core.transactions.TransactionBuilder
|
|||||||
import net.corda.core.utilities.getOrThrow
|
import net.corda.core.utilities.getOrThrow
|
||||||
import net.corda.core.utilities.unwrap
|
import net.corda.core.utilities.unwrap
|
||||||
import net.corda.node.services.Permissions.Companion.all
|
import net.corda.node.services.Permissions.Companion.all
|
||||||
import net.corda.testing.core.ALICE_NAME
|
import net.corda.testing.core.*
|
||||||
import net.corda.testing.core.BOB_NAME
|
|
||||||
import net.corda.testing.core.singleIdentity
|
|
||||||
import net.corda.testing.driver.DriverParameters
|
import net.corda.testing.driver.DriverParameters
|
||||||
import net.corda.testing.driver.PortAllocation
|
import net.corda.testing.driver.PortAllocation
|
||||||
import net.corda.testing.driver.driver
|
import net.corda.testing.driver.driver
|
||||||
|
import net.corda.testing.internal.IntegrationTest
|
||||||
|
import net.corda.testing.internal.IntegrationTestSchemas
|
||||||
|
import net.corda.testing.internal.toDatabaseSchemaName
|
||||||
import net.corda.testing.node.User
|
import net.corda.testing.node.User
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
|
import org.junit.ClassRule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
import java.util.concurrent.ScheduledExecutorService
|
import java.util.concurrent.ScheduledExecutorService
|
||||||
|
|
||||||
class FlowsDrainingModeContentionTest {
|
class FlowsDrainingModeContentionTest : IntegrationTest() {
|
||||||
|
companion object {
|
||||||
|
@ClassRule
|
||||||
|
@JvmField
|
||||||
|
val databaseSchemas = IntegrationTestSchemas(ALICE_NAME.toDatabaseSchemaName(), BOB_NAME.toDatabaseSchemaName(), DUMMY_NOTARY_NAME.toDatabaseSchemaName())
|
||||||
|
}
|
||||||
|
|
||||||
private val portAllocation = PortAllocation.Incremental(10000)
|
private val portAllocation = PortAllocation.Incremental(10000)
|
||||||
private val user = User("mark", "dadada", setOf(all()))
|
private val user = User("mark", "dadada", setOf(all()))
|
||||||
|
@ -44,7 +44,7 @@ class P2PFlowsDrainingModeTest : IntegrationTest() {
|
|||||||
companion object {
|
companion object {
|
||||||
@ClassRule
|
@ClassRule
|
||||||
@JvmField
|
@JvmField
|
||||||
val databaseSchemas = IntegrationTestSchemas(*listOf(ALICE_NAME, BOB_NAME, DUMMY_BANK_A_NAME, DUMMY_NOTARY_NAME)
|
val databaseSchemas = IntegrationTestSchemas(*listOf(ALICE_NAME, BOB_NAME, DUMMY_NOTARY_NAME)
|
||||||
.map { it.toDatabaseSchemaName() }.toTypedArray())
|
.map { it.toDatabaseSchemaName() }.toTypedArray())
|
||||||
|
|
||||||
private val logger = loggerFor<P2PFlowsDrainingModeTest>()
|
private val logger = loggerFor<P2PFlowsDrainingModeTest>()
|
||||||
|
Loading…
Reference in New Issue
Block a user