Skip to content

Commit f7d574a

Browse files
committed
fix : correct feathers-tasks test for CI completion #11
1 parent 1608229 commit f7d574a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

packages/feathers-tasks/test/helpers/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ export async function createApp (redisOptions, handlers = {}) {
2525
queueEvents.waitUntilReady()
2626
])
2727

28+
// Drain the queue so no stale jobs from previous test runs interfere
29+
await queue.obliterate({ force: true })
30+
2831
return app
2932
}

packages/feathers-tasks/test/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ describe('feathers-tasks', () => {
9090
it('transitions to completed status after successful execution', async () => {
9191
if (!redisAvailable) return
9292
const task = await app.service('tasks').create({ type: 'echo', payload: { x: 1 } })
93-
const updated = await waitForStatus(app, task.id, 'completed')
93+
const updated = await waitForStatus(app, task.id, 'completed', 15000)
9494
expect(updated.status).toBe('completed')
95-
})
95+
}, 20000)
9696

9797
it('transitions to failed status when handler throws', async () => {
9898
if (!redisAvailable) return

0 commit comments

Comments
 (0)