mirror of
https://github.com/corda/corda.git
synced 2025-05-02 08:43:15 +00:00
Vault query refactor (#3065)
* Move test initialization logic to jUnit rules for better composition and reusability
This commit is contained in:
parent
0f15c89ee0
commit
2cec6b095c
@ -1,6 +1,5 @@
|
|||||||
package net.corda.node.services.vault
|
package net.corda.node.services.vault
|
||||||
|
|
||||||
import net.corda.core.identity.CordaX500Name
|
|
||||||
import net.corda.core.internal.packageName
|
import net.corda.core.internal.packageName
|
||||||
import net.corda.core.node.services.*
|
import net.corda.core.node.services.*
|
||||||
import net.corda.core.node.services.vault.*
|
import net.corda.core.node.services.vault.*
|
||||||
@ -9,76 +8,25 @@ import net.corda.finance.*
|
|||||||
import net.corda.finance.contracts.asset.Cash
|
import net.corda.finance.contracts.asset.Cash
|
||||||
import net.corda.finance.schemas.CashSchemaV1
|
import net.corda.finance.schemas.CashSchemaV1
|
||||||
import net.corda.finance.schemas.SampleCashSchemaV3
|
import net.corda.finance.schemas.SampleCashSchemaV3
|
||||||
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
|
||||||
import net.corda.nodeapi.internal.persistence.DatabaseTransaction
|
|
||||||
import net.corda.testing.core.*
|
import net.corda.testing.core.*
|
||||||
import net.corda.testing.internal.rigorousMock
|
|
||||||
import net.corda.testing.internal.vault.VaultFiller
|
|
||||||
import net.corda.testing.node.MockServices
|
|
||||||
import net.corda.testing.node.MockServices.Companion.makeTestDatabaseAndMockServices
|
|
||||||
import net.corda.testing.node.makeTestIdentityService
|
|
||||||
import net.corda.testing.internal.vault.DummyLinearStateSchemaV1
|
import net.corda.testing.internal.vault.DummyLinearStateSchemaV1
|
||||||
import org.assertj.core.api.Assertions.assertThatThrownBy
|
import org.assertj.core.api.Assertions.assertThatThrownBy
|
||||||
import org.junit.*
|
import org.junit.*
|
||||||
import org.junit.rules.ExpectedException
|
import org.junit.rules.ExpectedException
|
||||||
|
|
||||||
class VaultQueryExceptionsTests {
|
class VaultQueryExceptionsTests : VaultQueryParties by rule {
|
||||||
private companion object {
|
|
||||||
val bankOfCorda = TestIdentity(BOC_NAME)
|
|
||||||
val cashNotary = TestIdentity(CordaX500Name("Cash Notary Service", "Zurich", "CH"), 21)
|
|
||||||
val dummyCashIssuer = TestIdentity(CordaX500Name("Snake Oil Issuer", "London", "GB"), 10)
|
|
||||||
val DUMMY_CASH_ISSUER = dummyCashIssuer.ref(1)
|
|
||||||
val dummyNotary = TestIdentity(DUMMY_NOTARY_NAME, 20)
|
|
||||||
val megaCorp = TestIdentity(CordaX500Name("MegaCorp", "London", "GB"))
|
|
||||||
val miniCorp = TestIdentity(CordaX500Name("MiniCorp", "London", "GB"))
|
|
||||||
val BOC_IDENTITY get() = bankOfCorda.identity
|
|
||||||
val BOC_KEY get() = bankOfCorda.keyPair
|
|
||||||
val CASH_NOTARY get() = cashNotary.party
|
|
||||||
val CASH_NOTARY_IDENTITY get() = cashNotary.identity
|
|
||||||
val DUMMY_NOTARY_KEY get() = dummyNotary.keyPair
|
|
||||||
val MEGA_CORP_IDENTITY get() = megaCorp.identity
|
|
||||||
val MEGA_CORP_KEY get() = megaCorp.keyPair
|
|
||||||
val MINI_CORP_IDENTITY get() = miniCorp.identity
|
|
||||||
|
|
||||||
private val cordappPackages = listOf(
|
companion object {
|
||||||
"net.corda.testing.contracts",
|
@ClassRule @JvmField
|
||||||
"net.corda.finance.contracts",
|
val rule = object : VaultQueryTestRule() {
|
||||||
CashSchemaV1::class.packageName,
|
override val cordappPackages = listOf(
|
||||||
DummyLinearStateSchemaV1::class.packageName) - SampleCashSchemaV3::class.packageName
|
"net.corda.testing.contracts",
|
||||||
|
"net.corda.finance.contracts",
|
||||||
private lateinit var services: MockServices
|
CashSchemaV1::class.packageName,
|
||||||
private lateinit var vaultFiller: VaultFiller
|
DummyLinearStateSchemaV1::class.packageName) - SampleCashSchemaV3::class.packageName
|
||||||
private lateinit var vaultFillerCashNotary: VaultFiller
|
|
||||||
private lateinit var notaryServices: MockServices
|
|
||||||
private val vaultService: VaultService get() = services.vaultService
|
|
||||||
private lateinit var identitySvc: IdentityService
|
|
||||||
private lateinit var database: CordaPersistence
|
|
||||||
|
|
||||||
|
|
||||||
@BeforeClass @JvmStatic
|
|
||||||
fun setUpClass() {
|
|
||||||
// register additional identities
|
|
||||||
val databaseAndServices = makeTestDatabaseAndMockServices(
|
|
||||||
cordappPackages,
|
|
||||||
makeTestIdentityService(Companion.MEGA_CORP_IDENTITY, Companion.MINI_CORP_IDENTITY, Companion.dummyCashIssuer.identity, Companion.dummyNotary.identity),
|
|
||||||
Companion.megaCorp,
|
|
||||||
moreKeys = Companion.DUMMY_NOTARY_KEY)
|
|
||||||
database = databaseAndServices.first
|
|
||||||
services = databaseAndServices.second
|
|
||||||
vaultFiller = VaultFiller(services, Companion.dummyNotary)
|
|
||||||
vaultFillerCashNotary = VaultFiller(services, Companion.dummyNotary, Companion.CASH_NOTARY)
|
|
||||||
notaryServices = MockServices(cordappPackages, Companion.dummyNotary, rigorousMock(), Companion.dummyCashIssuer.keyPair, Companion.BOC_KEY, Companion.MEGA_CORP_KEY)
|
|
||||||
identitySvc = services.identityService
|
|
||||||
// Register all of the identities we're going to use
|
|
||||||
(notaryServices.myInfo.legalIdentitiesAndCerts + Companion.BOC_IDENTITY + Companion.CASH_NOTARY_IDENTITY + Companion.MINI_CORP_IDENTITY + Companion.MEGA_CORP_IDENTITY).forEach { identity ->
|
|
||||||
services.identityService.verifyAndRegisterIdentity(identity)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private lateinit var transaction: DatabaseTransaction
|
|
||||||
|
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
@JvmField
|
@JvmField
|
||||||
val testSerialization = SerializationEnvironmentRule()
|
val testSerialization = SerializationEnvironmentRule()
|
||||||
@ -87,16 +35,9 @@ class VaultQueryExceptionsTests {
|
|||||||
@JvmField
|
@JvmField
|
||||||
val expectedEx: ExpectedException = ExpectedException.none()
|
val expectedEx: ExpectedException = ExpectedException.none()
|
||||||
|
|
||||||
@Before
|
@Rule
|
||||||
fun setUp() {
|
@JvmField
|
||||||
transaction = database.newTransaction()
|
val rollbackRule = VaultQueryRollbackRule(this)
|
||||||
}
|
|
||||||
|
|
||||||
@After
|
|
||||||
fun tearDown() {
|
|
||||||
transaction.rollback()
|
|
||||||
transaction.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `query attempting to use unregistered schema`() {
|
fun `query attempting to use unregistered schema`() {
|
||||||
|
@ -5,6 +5,7 @@ import net.corda.core.crypto.SecureHash
|
|||||||
import net.corda.core.crypto.generateKeyPair
|
import net.corda.core.crypto.generateKeyPair
|
||||||
import net.corda.core.crypto.toStringShort
|
import net.corda.core.crypto.toStringShort
|
||||||
import net.corda.core.identity.CordaX500Name
|
import net.corda.core.identity.CordaX500Name
|
||||||
|
import net.corda.core.identity.Party
|
||||||
import net.corda.core.internal.packageName
|
import net.corda.core.internal.packageName
|
||||||
import net.corda.core.node.services.*
|
import net.corda.core.node.services.*
|
||||||
import net.corda.core.node.services.vault.*
|
import net.corda.core.node.services.vault.*
|
||||||
@ -20,6 +21,7 @@ import net.corda.finance.contracts.asset.cash.selection.AbstractCashSelection
|
|||||||
import net.corda.finance.schemas.CashSchemaV1
|
import net.corda.finance.schemas.CashSchemaV1
|
||||||
import net.corda.finance.schemas.CashSchemaV1.PersistentCashState
|
import net.corda.finance.schemas.CashSchemaV1.PersistentCashState
|
||||||
import net.corda.finance.schemas.CommercialPaperSchemaV1
|
import net.corda.finance.schemas.CommercialPaperSchemaV1
|
||||||
|
import net.corda.finance.schemas.SampleCashSchemaV3
|
||||||
import net.corda.node.internal.configureDatabase
|
import net.corda.node.internal.configureDatabase
|
||||||
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
||||||
import net.corda.nodeapi.internal.persistence.DatabaseConfig
|
import net.corda.nodeapi.internal.persistence.DatabaseConfig
|
||||||
@ -27,16 +29,14 @@ import net.corda.nodeapi.internal.persistence.DatabaseTransaction
|
|||||||
import net.corda.testing.core.*
|
import net.corda.testing.core.*
|
||||||
import net.corda.testing.internal.TEST_TX_TIME
|
import net.corda.testing.internal.TEST_TX_TIME
|
||||||
import net.corda.testing.internal.rigorousMock
|
import net.corda.testing.internal.rigorousMock
|
||||||
import net.corda.testing.internal.vault.DUMMY_LINEAR_CONTRACT_PROGRAM_ID
|
import net.corda.testing.internal.vault.*
|
||||||
import net.corda.testing.internal.vault.DummyLinearContract
|
|
||||||
import net.corda.testing.internal.vault.VaultFiller
|
|
||||||
import net.corda.testing.node.MockServices
|
import net.corda.testing.node.MockServices
|
||||||
import net.corda.testing.node.MockServices.Companion.makeTestDatabaseAndMockServices
|
import net.corda.testing.node.MockServices.Companion.makeTestDatabaseAndMockServices
|
||||||
import net.corda.testing.node.makeTestIdentityService
|
import net.corda.testing.node.makeTestIdentityService
|
||||||
import net.corda.testing.internal.vault.DummyLinearStateSchemaV1
|
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.junit.*
|
import org.junit.*
|
||||||
import org.junit.rules.ExpectedException
|
import org.junit.rules.ExpectedException
|
||||||
|
import org.junit.rules.ExternalResource
|
||||||
import java.lang.Thread.sleep
|
import java.lang.Thread.sleep
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.time.LocalDate
|
import java.time.LocalDate
|
||||||
@ -44,98 +44,140 @@ import java.time.ZoneOffset
|
|||||||
import java.time.temporal.ChronoUnit
|
import java.time.temporal.ChronoUnit
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class VaultQueryTests {
|
interface VaultQueryParties {
|
||||||
private companion object {
|
val alice: TestIdentity
|
||||||
val alice = TestIdentity(ALICE_NAME, 70)
|
val bankOfCorda: TestIdentity
|
||||||
val bankOfCorda = TestIdentity(BOC_NAME)
|
val bigCorp: TestIdentity
|
||||||
val bigCorp = TestIdentity(CordaX500Name("BigCorporation", "New York", "US"))
|
val bob: TestIdentity
|
||||||
val bob = TestIdentity(BOB_NAME, 80)
|
val cashNotary: TestIdentity
|
||||||
val cashNotary = TestIdentity(CordaX500Name("Cash Notary Service", "Zurich", "CH"), 21)
|
val charlie: TestIdentity
|
||||||
val charlie = TestIdentity(CHARLIE_NAME, 90)
|
val dummyCashIssuer: TestIdentity
|
||||||
val dummyCashIssuer = TestIdentity(CordaX500Name("Snake Oil Issuer", "London", "GB"), 10)
|
val DUMMY_CASH_ISSUER: PartyAndReference
|
||||||
val DUMMY_CASH_ISSUER = dummyCashIssuer.ref(1)
|
val dummyNotary: TestIdentity
|
||||||
val dummyNotary = TestIdentity(DUMMY_NOTARY_NAME, 20)
|
val DUMMY_OBLIGATION_ISSUER: Party
|
||||||
val DUMMY_OBLIGATION_ISSUER = TestIdentity(CordaX500Name("Snake Oil Issuer", "London", "GB"), 10).party
|
val megaCorp: TestIdentity
|
||||||
val megaCorp = TestIdentity(CordaX500Name("MegaCorp", "London", "GB"))
|
val miniCorp: TestIdentity
|
||||||
val miniCorp = TestIdentity(CordaX500Name("MiniCorp", "London", "GB"))
|
|
||||||
val ALICE get() = alice.party
|
|
||||||
val ALICE_IDENTITY get() = alice.identity
|
|
||||||
val BIG_CORP get() = bigCorp.party
|
|
||||||
val BIG_CORP_IDENTITY get() = bigCorp.identity
|
|
||||||
val BOB get() = bob.party
|
|
||||||
val BOB_IDENTITY get() = bob.identity
|
|
||||||
val BOC get() = bankOfCorda.party
|
|
||||||
val BOC_IDENTITY get() = bankOfCorda.identity
|
|
||||||
val BOC_KEY get() = bankOfCorda.keyPair
|
|
||||||
val BOC_PUBKEY get() = bankOfCorda.publicKey
|
|
||||||
val CASH_NOTARY get() = cashNotary.party
|
|
||||||
val CASH_NOTARY_IDENTITY get() = cashNotary.identity
|
|
||||||
val CHARLIE get() = charlie.party
|
|
||||||
val CHARLIE_IDENTITY get() = charlie.identity
|
|
||||||
val DUMMY_NOTARY get() = dummyNotary.party
|
|
||||||
val DUMMY_NOTARY_KEY get() = dummyNotary.keyPair
|
|
||||||
val MEGA_CORP_IDENTITY get() = megaCorp.identity
|
|
||||||
val MEGA_CORP_PUBKEY get() = megaCorp.publicKey
|
|
||||||
val MEGA_CORP_KEY get() = megaCorp.keyPair
|
|
||||||
val MEGA_CORP get() = megaCorp.party
|
|
||||||
val MINI_CORP_IDENTITY get() = miniCorp.identity
|
|
||||||
val MINI_CORP get() = miniCorp.party
|
|
||||||
|
|
||||||
private val cordappPackages = listOf(
|
val ALICE get() = alice.party
|
||||||
"net.corda.testing.contracts",
|
val ALICE_IDENTITY get() = alice.identity
|
||||||
"net.corda.finance.contracts",
|
val BIG_CORP get() = bigCorp.party
|
||||||
CashSchemaV1::class.packageName,
|
val BIG_CORP_IDENTITY get() = bigCorp.identity
|
||||||
DummyLinearStateSchemaV1::class.packageName)
|
val BOB get() = bob.party
|
||||||
private lateinit var services: MockServices
|
val BOB_IDENTITY get() = bob.identity
|
||||||
private lateinit var vaultFiller: VaultFiller
|
val BOC get() = bankOfCorda.party
|
||||||
private lateinit var vaultFillerCashNotary: VaultFiller
|
val BOC_IDENTITY get() = bankOfCorda.identity
|
||||||
private lateinit var notaryServices: MockServices
|
val BOC_KEY get() = bankOfCorda.keyPair
|
||||||
private val vaultService: VaultService get() = services.vaultService
|
val BOC_PUBKEY get() = bankOfCorda.publicKey
|
||||||
private lateinit var identitySvc: IdentityService
|
val CASH_NOTARY get() = cashNotary.party
|
||||||
private lateinit var database: CordaPersistence
|
val CASH_NOTARY_IDENTITY get() = cashNotary.identity
|
||||||
|
val CHARLIE get() = charlie.party
|
||||||
|
val CHARLIE_IDENTITY get() = charlie.identity
|
||||||
|
val DUMMY_NOTARY get() = dummyNotary.party
|
||||||
|
val DUMMY_NOTARY_KEY get() = dummyNotary.keyPair
|
||||||
|
val MEGA_CORP_IDENTITY get() = megaCorp.identity
|
||||||
|
val MEGA_CORP_PUBKEY get() = megaCorp.publicKey
|
||||||
|
val MEGA_CORP_KEY get() = megaCorp.keyPair
|
||||||
|
val MEGA_CORP get() = megaCorp.party
|
||||||
|
val MINI_CORP_IDENTITY get() = miniCorp.identity
|
||||||
|
val MINI_CORP get() = miniCorp.party
|
||||||
|
|
||||||
@BeforeClass @JvmStatic
|
val services: MockServices
|
||||||
fun setUpClass() {
|
val vaultFiller: VaultFiller
|
||||||
// register additional identities
|
val vaultFillerCashNotary: VaultFiller
|
||||||
val databaseAndServices = makeTestDatabaseAndMockServices(
|
val notaryServices: MockServices
|
||||||
cordappPackages,
|
val vaultService: VaultService
|
||||||
makeTestIdentityService(MEGA_CORP_IDENTITY, MINI_CORP_IDENTITY, dummyCashIssuer.identity, dummyNotary.identity),
|
val identitySvc: IdentityService
|
||||||
Companion.megaCorp,
|
val database: CordaPersistence
|
||||||
moreKeys = DUMMY_NOTARY_KEY)
|
|
||||||
database = databaseAndServices.first
|
val cordappPackages: List<String>
|
||||||
services = databaseAndServices.second
|
}
|
||||||
vaultFiller = VaultFiller(services, dummyNotary)
|
|
||||||
vaultFillerCashNotary = VaultFiller(services, dummyNotary, CASH_NOTARY)
|
open class VaultQueryTestRule : ExternalResource(), VaultQueryParties {
|
||||||
notaryServices = MockServices(cordappPackages, dummyNotary, rigorousMock(), dummyCashIssuer.keyPair, BOC_KEY, MEGA_CORP_KEY)
|
|
||||||
identitySvc = services.identityService
|
override val alice = TestIdentity(ALICE_NAME, 70)
|
||||||
// Register all of the identities we're going to use
|
override val bankOfCorda = TestIdentity(BOC_NAME)
|
||||||
(notaryServices.myInfo.legalIdentitiesAndCerts + BOC_IDENTITY + CASH_NOTARY_IDENTITY + MINI_CORP_IDENTITY + MEGA_CORP_IDENTITY).forEach { identity ->
|
override val bigCorp = TestIdentity(CordaX500Name("BigCorporation", "New York", "US"))
|
||||||
services.identityService.verifyAndRegisterIdentity(identity)
|
override val bob = TestIdentity(BOB_NAME, 80)
|
||||||
}
|
override val cashNotary = TestIdentity(CordaX500Name("Cash Notary Service", "Zurich", "CH"), 21)
|
||||||
|
override val charlie = TestIdentity(CHARLIE_NAME, 90)
|
||||||
|
override val dummyCashIssuer = TestIdentity(CordaX500Name("Snake Oil Issuer", "London", "GB"), 10)
|
||||||
|
override val DUMMY_CASH_ISSUER = dummyCashIssuer.ref(1)
|
||||||
|
override val dummyNotary = TestIdentity(DUMMY_NOTARY_NAME, 20)
|
||||||
|
override val DUMMY_OBLIGATION_ISSUER = TestIdentity(CordaX500Name("Snake Oil Issuer", "London", "GB"), 10).party
|
||||||
|
override val megaCorp = TestIdentity(CordaX500Name("MegaCorp", "London", "GB"))
|
||||||
|
override val miniCorp = TestIdentity(CordaX500Name("MiniCorp", "London", "GB"))
|
||||||
|
override val MINI_CORP get() = miniCorp.party
|
||||||
|
|
||||||
|
override val cordappPackages = listOf(
|
||||||
|
"net.corda.testing.contracts",
|
||||||
|
"net.corda.finance.contracts",
|
||||||
|
CashSchemaV1::class.packageName,
|
||||||
|
DummyLinearStateSchemaV1::class.packageName,
|
||||||
|
SampleCashSchemaV3::class.packageName)
|
||||||
|
|
||||||
|
override lateinit var services: MockServices
|
||||||
|
override lateinit var vaultFiller: VaultFiller
|
||||||
|
override lateinit var vaultFillerCashNotary: VaultFiller
|
||||||
|
override lateinit var notaryServices: MockServices
|
||||||
|
override val vaultService: VaultService get() = services.vaultService
|
||||||
|
override lateinit var identitySvc: IdentityService
|
||||||
|
override lateinit var database: CordaPersistence
|
||||||
|
|
||||||
|
|
||||||
|
override fun before() {
|
||||||
|
// register additional identities
|
||||||
|
val databaseAndServices = makeTestDatabaseAndMockServices(
|
||||||
|
cordappPackages,
|
||||||
|
makeTestIdentityService(MEGA_CORP_IDENTITY, MINI_CORP_IDENTITY, dummyCashIssuer.identity, dummyNotary.identity),
|
||||||
|
megaCorp,
|
||||||
|
moreKeys = DUMMY_NOTARY_KEY)
|
||||||
|
database = databaseAndServices.first
|
||||||
|
services = databaseAndServices.second
|
||||||
|
vaultFiller = VaultFiller(services, dummyNotary)
|
||||||
|
vaultFillerCashNotary = VaultFiller(services, dummyNotary, CASH_NOTARY)
|
||||||
|
notaryServices = MockServices(cordappPackages, dummyNotary, rigorousMock(), dummyCashIssuer.keyPair, BOC_KEY, MEGA_CORP_KEY)
|
||||||
|
identitySvc = services.identityService
|
||||||
|
// Register all of the identities we're going to use
|
||||||
|
(notaryServices.myInfo.legalIdentitiesAndCerts + BOC_IDENTITY + CASH_NOTARY_IDENTITY + MINI_CORP_IDENTITY + MEGA_CORP_IDENTITY).forEach { identity ->
|
||||||
|
services.identityService.verifyAndRegisterIdentity(identity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private lateinit var transaction: DatabaseTransaction
|
override fun after() {
|
||||||
|
database.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class VaultQueryRollbackRule(val vaultQueryParties: VaultQueryParties) : ExternalResource() {
|
||||||
|
|
||||||
@Rule
|
lateinit var transaction: DatabaseTransaction
|
||||||
@JvmField
|
|
||||||
val testSerialization = SerializationEnvironmentRule()
|
override fun before() {
|
||||||
|
transaction = vaultQueryParties.database.newTransaction()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun after() {
|
||||||
|
transaction.rollback()
|
||||||
|
transaction.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class VaultQueryTestsBase : VaultQueryParties {
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
@JvmField
|
@JvmField
|
||||||
val expectedEx: ExpectedException = ExpectedException.none()
|
val expectedEx: ExpectedException = ExpectedException.none()
|
||||||
|
|
||||||
@Before
|
@Suppress("LeakingThis")
|
||||||
fun setUp() {
|
@Rule
|
||||||
transaction = database.newTransaction()
|
@JvmField
|
||||||
|
val transactionRule = VaultQueryRollbackRule(this)
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@ClassRule @JvmField
|
||||||
|
val testSerialization = SerializationEnvironmentRule()
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
|
||||||
fun tearDown() {
|
|
||||||
transaction.rollback()
|
|
||||||
transaction.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method for generating a Persistent H2 test database
|
* Helper method for generating a Persistent H2 test database
|
||||||
@ -2166,4 +2208,12 @@ class VaultQueryTests {
|
|||||||
* 3) Template / Tutorial CorDapp service query extension executing Named Queries via JPA
|
* 3) Template / Tutorial CorDapp service query extension executing Named Queries via JPA
|
||||||
* 4) Advanced pagination queries using Spring Data (and/or Hibernate/JPQL)
|
* 4) Advanced pagination queries using Spring Data (and/or Hibernate/JPQL)
|
||||||
*/
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
class VaultQueryTests : VaultQueryTestsBase(), VaultQueryParties by vaultQueryTestRule {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@ClassRule @JvmField
|
||||||
|
val vaultQueryTestRule = VaultQueryTestRule()
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user