mirror of
https://github.com/corda/corda.git
synced 2025-06-06 01:11:45 +00:00
Fix up Enterprise only Integration tests
This commit is contained in:
parent
4d335843b2
commit
2fafb118a1
@ -32,6 +32,8 @@ import net.corda.testing.core.dummyCommand
|
|||||||
import net.corda.testing.core.singleIdentity
|
import net.corda.testing.core.singleIdentity
|
||||||
import net.corda.testing.internal.IntegrationTest
|
import net.corda.testing.internal.IntegrationTest
|
||||||
import net.corda.testing.internal.IntegrationTestSchemas
|
import net.corda.testing.internal.IntegrationTestSchemas
|
||||||
|
import net.corda.testing.node.MockNetNotaryConfig
|
||||||
|
import net.corda.testing.node.MockNodeConfigOverrides
|
||||||
import net.corda.testing.node.TestClock
|
import net.corda.testing.node.TestClock
|
||||||
import net.corda.testing.node.internal.*
|
import net.corda.testing.node.internal.*
|
||||||
import org.assertj.core.api.Assertions
|
import org.assertj.core.api.Assertions
|
||||||
@ -253,16 +255,12 @@ class MySQLNotaryServiceTests : IntegrationTest() {
|
|||||||
InternalMockNodeParameters(
|
InternalMockNodeParameters(
|
||||||
legalName = notaryNodeName,
|
legalName = notaryNodeName,
|
||||||
entropyRoot = BigInteger.valueOf(60L),
|
entropyRoot = BigInteger.valueOf(60L),
|
||||||
configOverrides = {
|
configOverrides = MockNodeConfigOverrides(
|
||||||
val notaryConfig = NotaryConfig(
|
notary = MockNetNotaryConfig(
|
||||||
validating = true,
|
validating = true,
|
||||||
extraConfig = MySQLNotaryConfiguration(dataStoreProperties, maxBatchSize = 10, maxBatchInputStates = 100).toConfig(),
|
extraConfig = MySQLNotaryConfiguration(dataStoreProperties, maxBatchSize = 10, maxBatchInputStates = 100).toConfig(),
|
||||||
serviceLegalName = notaryName,
|
serviceLegalName = notaryName,
|
||||||
className = MySQLNotaryService::class.java.name
|
className = MySQLNotaryService::class.java.name
|
||||||
)
|
))))
|
||||||
doReturn(notaryConfig).whenever(it).notary
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import net.corda.core.internal.concurrent.transpose
|
|||||||
import net.corda.core.utilities.OpaqueBytes
|
import net.corda.core.utilities.OpaqueBytes
|
||||||
import net.corda.core.utilities.getOrThrow
|
import net.corda.core.utilities.getOrThrow
|
||||||
import net.corda.testing.node.MockNetwork
|
import net.corda.testing.node.MockNetwork
|
||||||
|
import net.corda.testing.node.MockNodeConfigOverrides
|
||||||
import net.corda.testing.node.MockNodeParameters
|
import net.corda.testing.node.MockNodeParameters
|
||||||
import org.assertj.core.api.Assertions.assertThatThrownBy
|
import org.assertj.core.api.Assertions.assertThatThrownBy
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
@ -40,10 +41,9 @@ class CashSelectionH2Test {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `check does not hold connection over retries`() {
|
fun `check does not hold connection over retries`() {
|
||||||
val bankA = mockNet.createNode(MockNodeParameters(configOverrides = {
|
val bankA = mockNet.createNode(MockNodeParameters(configOverrides = MockNodeConfigOverrides(
|
||||||
// Tweak connections to be minimal to make this easier (1 results in a hung node during start up, so use 2 connections).
|
// Tweak connections to be minimal to make this easier (1 results in a hung node during start up, so use 2 connections).
|
||||||
it.dataSourceProperties.setProperty("maximumPoolSize", "2")
|
extraDataSourceProperties = mapOf("maximumPoolSize" to "2"))))
|
||||||
}))
|
|
||||||
val notary = mockNet.defaultNotaryIdentity
|
val notary = mockNet.defaultNotaryIdentity
|
||||||
|
|
||||||
// Start more cash spends than we have connections. If spend leaks a connection on retry, we will run out of connections.
|
// Start more cash spends than we have connections. If spend leaks a connection on retry, we will run out of connections.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user