Test the scheduler picking up a persisted scheduled state without shutting down/restart the db. (#5236)

This commit is contained in:
Christian Sailer 2019-06-21 15:16:10 +01:00 committed by Rick Parker
parent 96e52e2ec8
commit 0cd57c81bc

View File

@ -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()
}
}