Skip to content

Commit 957bb63

Browse files
feat: handle process exist, add graceful shutdown
1 parent 6631142 commit 957bb63

File tree

7 files changed

+692
-284
lines changed

7 files changed

+692
-284
lines changed

__tests__/helpers/launchers-test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('helpers/launchers', () => {
129129
remoteMiddleware: {
130130
isEnable: true,
131131
type: 'server',
132-
getRepository: () => ({ this: 'is repository' } as unknown as IMiddlewareRepository),
132+
getRepository: () => ({ this: 'is repository' }) as unknown as IMiddlewareRepository,
133133
},
134134
remoteConfig: { isDisable: false },
135135
hooks: {
@@ -167,6 +167,7 @@ describe('helpers/launchers', () => {
167167

168168
it('should throw error if microservice start failed', async () => {
169169
sandbox.stub(Microservice.getInstance(), 'start').rejects();
170+
sandbox.stub(process, 'exit');
170171

171172
const res = start({
172173
type: 'microservice',

0 commit comments

Comments
 (0)