Skip to content

Commit 31a6306

Browse files
committed
chore: fix failing tests
1 parent 016a0d2 commit 31a6306

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/backend/src/workers/__tests__/action.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ describe('action workers', () => {
4444

4545
it('creates the worker for the main action queue and makes it undelayable', () => {
4646
expect(mocks.makeActionWorker).toHaveBeenCalledWith({
47+
appKey: MAIN_ACTION_QUEUE_NAME,
4748
queueName: MAIN_ACTION_QUEUE_NAME,
4849
redisConnectionPrefix: MAIN_ACTION_QUEUE_REDIS_CONNECTION_PREFIX,
4950
queueConfig: {
@@ -54,10 +55,12 @@ describe('action workers', () => {
5455

5556
it('creates a worker for each app that has their own action queue', () => {
5657
expect(mocks.makeActionWorker).toHaveBeenCalledWith({
58+
appKey: 'app-with-queue-1',
5759
queueName: '{app-actions-app-with-queue-1}',
5860
queueConfig: { stubQueueConfig: 1 },
5961
})
6062
expect(mocks.makeActionWorker).toHaveBeenCalledWith({
63+
appKey: 'app-with-queue-2',
6164
queueName: '{app-actions-app-with-queue-2}',
6265
queueConfig: { stubQueueConfig: 2 },
6366
})

packages/backend/src/workers/__tests__/helpers.make-action-worker.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ describe('makeActionWorker', () => {
6363

6464
it('creates a worker for the specified queue name', () => {
6565
makeActionWorker({
66+
appKey: 'test-app',
6667
queueName: '{test-app-queue}',
6768
queueConfig: { isQueueDelayable: false },
6869
})
@@ -78,6 +79,7 @@ describe('makeActionWorker', () => {
7879

7980
it('supports specifying a redis connection prefix', () => {
8081
makeActionWorker({
82+
appKey: 'test-app',
8183
queueName: 'some-queue',
8284
redisConnectionPrefix: '{test}',
8385
queueConfig: { isQueueDelayable: false },
@@ -170,6 +172,7 @@ describe('makeActionWorker', () => {
170172
"sets up queue according to the app's queue config",
171173
({ appQueueConfig, expectedWorkerOptions }) => {
172174
makeActionWorker({
175+
appKey: 'test-app',
173176
queueName: '{test-app-queue}',
174177
queueConfig: appQueueConfig,
175178
})

0 commit comments

Comments
 (0)