mirror of
https://github.com/corda/corda.git
synced 2025-06-01 23:20:54 +00:00
Test the scheduler picking up a persisted scheduled state without shutting down/restart the db. (#5236)
This commit is contained in:
parent
96e52e2ec8
commit
0cd57c81bc
@ -312,15 +312,13 @@ class NodeSchedulerPersistenceTest : NodeSchedulerServiceTestBase() {
|
|||||||
|
|
||||||
// Force the thread to shut down with operations waiting
|
// Force the thread to shut down with operations waiting
|
||||||
scheduler.cancelAndWait()
|
scheduler.cancelAndWait()
|
||||||
}
|
|
||||||
|
|
||||||
val flowLogic = rigorousMock<FlowLogic<*>>()
|
val flowLogic = rigorousMock<FlowLogic<*>>()
|
||||||
val logicRef = rigorousMock<FlowLogicRef>()
|
val logicRef = rigorousMock<FlowLogicRef>()
|
||||||
|
|
||||||
transactionStates[stateRef] = transactionStateMock(logicRef, timeInTheFuture)
|
transactionStates[stateRef] = transactionStateMock(logicRef, timeInTheFuture)
|
||||||
flows[logicRef] = flowLogic
|
flows[logicRef] = flowLogic
|
||||||
|
|
||||||
configureDatabase(dataSourceProps, DatabaseConfig(), { null }, { null }).use { database ->
|
|
||||||
val newScheduler = database.transaction {
|
val newScheduler = database.transaction {
|
||||||
createScheduler(database)
|
createScheduler(database)
|
||||||
}
|
}
|
||||||
@ -328,6 +326,7 @@ class NodeSchedulerPersistenceTest : NodeSchedulerServiceTestBase() {
|
|||||||
assertStarted(flowLogic)
|
assertStarted(flowLogic)
|
||||||
|
|
||||||
newScheduler.close()
|
newScheduler.close()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user