mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +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
|
||||
scheduler.cancelAndWait()
|
||||
}
|
||||
|
||||
val flowLogic = rigorousMock<FlowLogic<*>>()
|
||||
val logicRef = rigorousMock<FlowLogicRef>()
|
||||
val flowLogic = rigorousMock<FlowLogic<*>>()
|
||||
val logicRef = rigorousMock<FlowLogicRef>()
|
||||
|
||||
transactionStates[stateRef] = transactionStateMock(logicRef, timeInTheFuture)
|
||||
flows[logicRef] = flowLogic
|
||||
transactionStates[stateRef] = transactionStateMock(logicRef, timeInTheFuture)
|
||||
flows[logicRef] = flowLogic
|
||||
|
||||
configureDatabase(dataSourceProps, DatabaseConfig(), { null }, { null }).use { database ->
|
||||
val newScheduler = database.transaction {
|
||||
createScheduler(database)
|
||||
}
|
||||
@ -328,6 +326,7 @@ class NodeSchedulerPersistenceTest : NodeSchedulerServiceTestBase() {
|
||||
assertStarted(flowLogic)
|
||||
|
||||
newScheduler.close()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user