mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
* CORDA-939 - Dont expose FlowStateMachine via public API (#2438) * Create CordaInternal attribute for properties on public classes that are not part of the api and apply to FlowLogic.stateMachine * Remove startFlow from public test api and replace with startFlowAndReturnFuture * Update api-current with changed signature * Change test used in documentation to use public test methods * Remove the rest of the unneccessary usages of the startFlow test utility * Remove extra whitespace * Rename startFlowAndReturnFuture back to startFlow * Update api * The annotation doesn't appear unless its marked as on the actual getter and setter * Updated docs and removed pointless attribute * Deleted whitespace # Conflicts: # .ci/api-current.txt # testing/node-driver/src/main/kotlin/net/corda/testing/node/NodeTestUtils.kt * Revert api-current to v1 api * Adding missing line and missing annotations * Made changes post review * Minor text change
This commit is contained in:
committed by
Katelyn Baker
parent
9c2b5f4ced
commit
e41408d21e
@ -15,11 +15,7 @@ import net.corda.core.utilities.unwrap
|
||||
import net.corda.node.internal.StartedNode
|
||||
import net.corda.node.services.messaging.Message
|
||||
import net.corda.node.services.statemachine.SessionData
|
||||
import net.corda.testing.node.InMemoryMessagingNetwork
|
||||
import net.corda.testing.node.MessagingServiceSpy
|
||||
import net.corda.testing.node.MockNetwork
|
||||
import net.corda.testing.node.setMessagingServiceSpy
|
||||
import net.corda.testing.node.startFlow
|
||||
import net.corda.testing.node.*
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
@ -102,6 +98,6 @@ class TutorialMockNetwork {
|
||||
|
||||
expectedEx.expect(IllegalArgumentException::class.java)
|
||||
expectedEx.expectMessage("Expected to receive 1")
|
||||
initiatingReceiveFlow.resultFuture.getOrThrow()
|
||||
initiatingReceiveFlow.getOrThrow()
|
||||
}
|
||||
}
|
@ -60,7 +60,7 @@ class CustomVaultQueryTest {
|
||||
OpaqueBytes.of(0x01),
|
||||
notary))
|
||||
// Wait for the flow to stop and print
|
||||
flowHandle1.resultFuture.getOrThrow()
|
||||
flowHandle1.getOrThrow()
|
||||
}
|
||||
|
||||
private fun topUpCurrencies() {
|
||||
@ -69,7 +69,7 @@ class CustomVaultQueryTest {
|
||||
OpaqueBytes.of(0x01),
|
||||
nodeA.info.chooseIdentity(),
|
||||
notary))
|
||||
flowHandle1.resultFuture.getOrThrow()
|
||||
flowHandle1.getOrThrow()
|
||||
}
|
||||
|
||||
private fun getBalances(): Pair<Map<Currency, Amount<Currency>>, Map<Currency, Amount<Currency>>> {
|
||||
|
@ -43,7 +43,7 @@ class FxTransactionBuildTutorialTest {
|
||||
OpaqueBytes.of(0x01),
|
||||
notary))
|
||||
// Wait for the flow to stop and print
|
||||
flowHandle1.resultFuture.getOrThrow()
|
||||
flowHandle1.getOrThrow()
|
||||
printBalances()
|
||||
|
||||
// Using NodeB as Issuer create some pounds.
|
||||
@ -51,7 +51,7 @@ class FxTransactionBuildTutorialTest {
|
||||
OpaqueBytes.of(0x01),
|
||||
notary))
|
||||
// Wait for flow to come to an end and print
|
||||
flowHandle2.resultFuture.getOrThrow()
|
||||
flowHandle2.getOrThrow()
|
||||
printBalances()
|
||||
|
||||
// Setup some futures on the vaults to await the arrival of the exchanged funds at both nodes
|
||||
@ -65,7 +65,7 @@ class FxTransactionBuildTutorialTest {
|
||||
nodeB.info.chooseIdentity(),
|
||||
weAreBaseCurrencySeller = false))
|
||||
// wait for the flow to finish and the vault updates to be done
|
||||
doIt.resultFuture.getOrThrow()
|
||||
doIt.getOrThrow()
|
||||
// Get the balances when the vault updates
|
||||
nodeAVaultUpdate.get()
|
||||
val balancesA = nodeA.database.transaction {
|
||||
|
@ -56,7 +56,7 @@ class WorkflowTransactionBuildTutorialTest {
|
||||
// Kick of the proposal flow
|
||||
val flow1 = aliceServices.startFlow(SubmitTradeApprovalFlow("1234", bob))
|
||||
// Wait for the flow to finish
|
||||
val proposalRef = flow1.resultFuture.getOrThrow()
|
||||
val proposalRef = flow1.getOrThrow()
|
||||
val proposalLinearId = proposalRef.state.data.linearId
|
||||
// Wait for NodeB to include it's copy in the vault
|
||||
nodeBVaultUpdate.get()
|
||||
@ -80,7 +80,7 @@ class WorkflowTransactionBuildTutorialTest {
|
||||
// Run the manual completion flow from NodeB
|
||||
val flow2 = bobServices.startFlow(SubmitCompletionFlow(latestFromB.ref, WorkflowState.APPROVED))
|
||||
// wait for the flow to end
|
||||
val completedRef = flow2.resultFuture.getOrThrow()
|
||||
val completedRef = flow2.getOrThrow()
|
||||
// wait for the vault updates to stabilise
|
||||
nodeAVaultUpdate.get()
|
||||
secondNodeBVaultUpdate.get()
|
||||
|
Reference in New Issue
Block a user