mirror of
https://github.com/corda/corda.git
synced 2025-06-14 21:28:14 +00:00
add timeouts to all tests (#5875)
This commit is contained in:
@ -27,8 +27,8 @@ import java.util.*
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class KotlinIntegrationTestingTutorial {
|
||||
@Test
|
||||
fun `alice bob cash exchange example`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `alice bob cash exchange example`() {
|
||||
// START 1
|
||||
driver(DriverParameters(startNodesInProcess = true, cordappsForAllNodes = FINANCE_CORDAPPS)) {
|
||||
val aliceUser = User("aliceUser", "testPassword1", permissions = setOf(
|
||||
|
@ -16,8 +16,8 @@ import kotlin.test.assertEquals
|
||||
|
||||
class TutorialFlowAsyncOperationTest {
|
||||
// DOCSTART summingWorks
|
||||
@Test
|
||||
fun summingWorks() {
|
||||
@Test(timeout=300_000)
|
||||
fun summingWorks() {
|
||||
driver(DriverParameters(startNodesInProcess = true, cordappsForAllNodes = listOf(cordappWithPackages("net.corda.docs.kotlin.tutorial.flowstatemachines")))) {
|
||||
val aliceUser = User("aliceUser", "testPassword1", permissions = setOf(Permissions.all()))
|
||||
val alice = startNode(providedName = ALICE_NAME, rpcUsers = listOf(aliceUser)).getOrThrow()
|
||||
|
@ -26,8 +26,8 @@ class ExampleConfigTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `example node_confs parses fine`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `example node_confs parses fine`() {
|
||||
readAndCheckConfigurations("example-node.conf") {
|
||||
val baseDirectory = Paths.get("some-example-base-dir")
|
||||
assertThat(ConfigHelper.loadConfig(baseDirectory = baseDirectory, configFile = it).parseAsNodeConfiguration().isValid).isTrue()
|
||||
|
@ -35,8 +35,8 @@ class FxTransactionBuildTutorialTest {
|
||||
mockNet.stopNodes()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Run ForeignExchangeFlow to completion`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `Run ForeignExchangeFlow to completion`() {
|
||||
// Use NodeA as issuer and create some dollars and wait for the flow to stop
|
||||
nodeA.startFlow(CashIssueFlow(DOLLARS(1000),
|
||||
OpaqueBytes.of(0x01),
|
||||
|
@ -107,8 +107,8 @@ class TutorialTestDSL {
|
||||
// DOCEND 3
|
||||
|
||||
// DOCSTART 4
|
||||
@Test
|
||||
fun simpleCPMoveFails() {
|
||||
@Test(timeout=300_000)
|
||||
fun simpleCPMoveFails() {
|
||||
val inState = getPaper()
|
||||
ledgerServices.ledger(dummyNotary.party) {
|
||||
transaction {
|
||||
@ -122,8 +122,8 @@ class TutorialTestDSL {
|
||||
// DOCEND 4
|
||||
|
||||
// DOCSTART 5
|
||||
@Test
|
||||
fun simpleCPMoveFailureAndSuccess() {
|
||||
@Test(timeout=300_000)
|
||||
fun simpleCPMoveFailureAndSuccess() {
|
||||
val inState = getPaper()
|
||||
ledgerServices.ledger(dummyNotary.party) {
|
||||
transaction {
|
||||
@ -139,8 +139,8 @@ class TutorialTestDSL {
|
||||
// DOCEND 5
|
||||
|
||||
// DOCSTART 13
|
||||
@Test
|
||||
fun simpleCPMoveSuccess() {
|
||||
@Test(timeout=300_000)
|
||||
fun simpleCPMoveSuccess() {
|
||||
val inState = getPaper()
|
||||
ledgerServices.ledger(dummyNotary.party) {
|
||||
transaction {
|
||||
@ -156,8 +156,8 @@ class TutorialTestDSL {
|
||||
// DOCEND 13
|
||||
|
||||
// DOCSTART 6
|
||||
@Test
|
||||
fun `simple issuance with tweak`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `simple issuance with tweak`() {
|
||||
ledgerServices.ledger(dummyNotary.party) {
|
||||
transaction {
|
||||
output(CP_PROGRAM_ID, "paper", getPaper()) // Some CP is issued onto the ledger by MegaCorp.
|
||||
@ -177,8 +177,8 @@ class TutorialTestDSL {
|
||||
// DOCEND 6
|
||||
|
||||
// DOCSTART 7
|
||||
@Test
|
||||
fun `simple issuance with tweak and top level transaction`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `simple issuance with tweak and top level transaction`() {
|
||||
ledgerServices.transaction(dummyNotary.party) {
|
||||
output(CP_PROGRAM_ID, "paper", getPaper()) // Some CP is issued onto the ledger by MegaCorp.
|
||||
attachments(CP_PROGRAM_ID)
|
||||
@ -196,8 +196,8 @@ class TutorialTestDSL {
|
||||
// DOCEND 7
|
||||
|
||||
// DOCSTART 8
|
||||
@Test
|
||||
fun `chain commercial paper`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `chain commercial paper`() {
|
||||
val issuer = megaCorp.party.ref(123)
|
||||
ledgerServices.ledger(dummyNotary.party) {
|
||||
unverifiedTransaction {
|
||||
@ -229,8 +229,8 @@ class TutorialTestDSL {
|
||||
// DOCEND 8
|
||||
|
||||
// DOCSTART 9
|
||||
@Test
|
||||
fun `chain commercial paper double spend`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `chain commercial paper double spend`() {
|
||||
val issuer = megaCorp.party.ref(123)
|
||||
ledgerServices.ledger(dummyNotary.party) {
|
||||
unverifiedTransaction {
|
||||
@ -271,8 +271,8 @@ class TutorialTestDSL {
|
||||
// DOCEND 9
|
||||
|
||||
// DOCSTART 10
|
||||
@Test
|
||||
fun `chain commercial tweak`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `chain commercial tweak`() {
|
||||
val issuer = megaCorp.party.ref(123)
|
||||
ledgerServices.ledger(dummyNotary.party) {
|
||||
unverifiedTransaction {
|
||||
|
@ -46,8 +46,8 @@ class WorkflowTransactionBuildTutorialTest {
|
||||
mockNet.stopNodes()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Run workflow to completion`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `Run workflow to completion`() {
|
||||
// Setup a vault subscriber to wait for successful upload of the proposal to NodeB
|
||||
val nodeBVaultUpdate = bobNode.services.vaultService.updates.toFuture()
|
||||
// Kick of the proposal flow
|
||||
|
@ -43,8 +43,8 @@ class CustomVaultQueryTest {
|
||||
mockNet.stopNodes()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `query by max recorded time`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `query by max recorded time`() {
|
||||
nodeA.startFlow(IOUFlow(1000, nodeB.info.singleIdentity())).getOrThrow()
|
||||
nodeA.startFlow(IOUFlow(500, nodeB.info.singleIdentity())).getOrThrow()
|
||||
|
||||
@ -58,8 +58,8 @@ class CustomVaultQueryTest {
|
||||
assertThatCode { results.otherResults.single() }.doesNotThrowAnyException()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test custom vault query`() {
|
||||
@Test(timeout=300_000)
|
||||
fun `test custom vault query`() {
|
||||
// issue some cash in several currencies
|
||||
issueCashForCurrency(POUNDS(1000))
|
||||
issueCashForCurrency(DOLLARS(900))
|
||||
|
Reference in New Issue
Block a user