Chore/test runner improvements (#12439)
**What** Make sure there is no open handles left and that the shutdown function are properly called. Refactor and improve the medusa test runner. Make sure all modules instances are released and cleaned up **NOTE:** On a separate PR we can continue the investigation for the memory growing over time while the tests execute
This commit is contained in:
committed by
GitHub
parent
e60d15ea84
commit
ab22faaa52
@@ -70,14 +70,6 @@ export class WorkflowsModuleService<
|
||||
}
|
||||
|
||||
__hooks = {
|
||||
onApplicationShutdown: async () => {
|
||||
await this.workflowOrchestratorService_.onApplicationShutdown()
|
||||
await this.redisDisconnectHandler_()
|
||||
clearInterval(this.clearTimeout_)
|
||||
},
|
||||
onApplicationPrepareShutdown: async () => {
|
||||
await this.workflowOrchestratorService_.onApplicationPrepareShutdown()
|
||||
},
|
||||
onApplicationStart: async () => {
|
||||
await this.workflowOrchestratorService_.onApplicationStart()
|
||||
|
||||
@@ -88,6 +80,14 @@ export class WorkflowsModuleService<
|
||||
} catch {}
|
||||
}, 1000 * 60 * 60)
|
||||
},
|
||||
onApplicationPrepareShutdown: async () => {
|
||||
await this.workflowOrchestratorService_.onApplicationPrepareShutdown()
|
||||
},
|
||||
onApplicationShutdown: async () => {
|
||||
await this.workflowOrchestratorService_.onApplicationShutdown()
|
||||
await this.redisDisconnectHandler_()
|
||||
clearInterval(this.clearTimeout_)
|
||||
},
|
||||
}
|
||||
|
||||
static prepareFilters<T>(filters: T & { q?: string }) {
|
||||
|
||||
Reference in New Issue
Block a user