Skip to content

Commit

Permalink
chore(tests): remove empty catch statements
Browse files Browse the repository at this point in the history
  • Loading branch information
jwulf committed Dec 19, 2024
1 parent 89fd95c commit d4b6773
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@ beforeEach(() => {
})

afterEach(async () => {
try {
if (wf?.processInstanceKey) {
await zbc.cancelProcessInstance(wf.processInstanceKey)
}
} catch (e: unknown) {
} finally {
await zbc.close() // Makes sure we don't forget to close connection
if (wf?.processInstanceKey) {
await zbc.cancelProcessInstance(wf.processInstanceKey).catch((e) => e)
}
await zbc.close() // Makes sure we don't forget to close connection
})

test('can update Job Timeout', async () => {
Expand Down
10 changes: 3 additions & 7 deletions src/__tests__/zeebe/integration/Worker-Failure-Retries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@ beforeEach(() => {
})

afterEach(async () => {
try {
if (wf?.processInstanceKey) {
await zbc.cancelProcessInstance(wf.processInstanceKey)
}
} catch (e: unknown) {
} finally {
await zbc.close() // Makes sure we don't forget to close connection
if (wf?.processInstanceKey) {
await zbc.cancelProcessInstance(wf.processInstanceKey).catch((e) => e)
}
await zbc.close() // Makes sure we don't forget to close connection
})

test('Decrements the retries count by default', async () => {
Expand Down

0 comments on commit d4b6773

Please sign in to comment.