Skip to content

Commit

Permalink
test(camunda8): stop worker in broadcastSignal test
Browse files Browse the repository at this point in the history
  • Loading branch information
jwulf committed Sep 18, 2024
1 parent 41915cd commit 3abe543
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/c8/rest/restBroadcastSignal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ test('Can start a process with a signal', async () => {

expect(res.key).toBeTruthy()

await new Promise((resolve) =>
c8.createJobWorker({
await new Promise((resolve) => {
const w = c8.createJobWorker({
type: 'signal-service-task',
worker: 'signal-worker',
timeout: 10000,
Expand All @@ -44,9 +44,9 @@ test('Can start a process with a signal', async () => {
jobHandler: (job) => {
const ack = job.complete()
expect(job.variables.success).toBe(true)
resolve(null)
w.stop().then(() => resolve(null))
return ack
},
})
)
})
})

0 comments on commit 3abe543

Please sign in to comment.