Skip to content

Commit

Permalink
test(clean): fix flaky test (#2680)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Jul 31, 2024
1 parent 1b31a6c commit 0a72b19
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
18 changes: 18 additions & 0 deletions docs/gitbook/bullmq-pro/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# [7.13.0](https://github.com/taskforcesh/bullmq-pro/compare/v7.12.0...v7.13.0) (2024-07-31)


### Bug Fixes

* **repeatable:** remove repeat hash when removing repeatable job ([#2676](https://github.com/taskforcesh/bullmq/issues/2676)) ([97a297d](https://github.com/taskforcesh/bullmq/commit/97a297d90ad8b27bcddb7db6a8a158acfb549389))
* **repeatable:** keep legacy repeatables if it exists instead of creating one with new structure ([#2665](https://github.com/taskforcesh/bullmq/issues/2665)) ([93fad41](https://github.com/taskforcesh/bullmq/commit/93fad41a9520961d0e6814d82454bc916a039501))
* **repeatable:** consider removing legacy repeatable job ([#2658](https://github.com/taskforcesh/bullmq/issues/2658)) fixes [#2661](https://github.com/taskforcesh/bullmq/issues/2661) ([a6764ae](https://github.com/taskforcesh/bullmq/commit/a6764aecb557fb918d061f5e5c2e26e4afa3e8ee))
* **repeatable:** pass custom key as an args in addRepeatableJob to prevent CROSSSLOT issue ([#2662](https://github.com/taskforcesh/bullmq/issues/2662)) fixes [#2660](https://github.com/taskforcesh/bullmq/issues/2660) ([9d8f874](https://github.com/taskforcesh/bullmq/commit/9d8f874b959e09662985f38c4614b95ab4d5e89c))

### Features

* **repeatable:** new repeatables structure ([#2617](https://github.com/taskforcesh/bullmq/issues/2617)) ref [#2612](https://github.com/taskforcesh/bullmq/issues/2612) fixes [#2399](https://github.com/taskforcesh/bullmq/issues/2399) [#2596](https://github.com/taskforcesh/bullmq/issues/2596) ([8376a9a](https://github.com/taskforcesh/bullmq/commit/8376a9a9007f58ac7eab1a3a1c2f9e7ec373bbd6))

### Performance Improvements

* **worker:** fetch next job on failure ([#2342](https://github.com/taskforcesh/bullmq/issues/2342)) ([f917b80](https://github.com/taskforcesh/bullmq/commit/f917b8090f306c0580aac12f6bd4394fd9ef003d))

# [7.12.0](https://github.com/taskforcesh/bullmq-pro/compare/v7.11.0...v7.12.0) (2024-07-26)


Expand Down
2 changes: 1 addition & 1 deletion docs/gitbook/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

### Features

* **job:** allow passing a debounce as option ([#2666](https://github.com/taskforcesh/bullmq/issues/2666)) ([163ccea](https://github.com/taskforcesh/bullmq/commit/163ccea19ef48191c4db6da27638ff6fb0080a74))
* **job:** allow passing debounce as option ([#2666](https://github.com/taskforcesh/bullmq/issues/2666)) ([163ccea](https://github.com/taskforcesh/bullmq/commit/163ccea19ef48191c4db6da27638ff6fb0080a74))

## [5.10.4](https://github.com/taskforcesh/bullmq/compare/v5.10.3...v5.10.4) (2024-07-26)

Expand Down
22 changes: 9 additions & 13 deletions tests/test_clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,20 +375,16 @@ describe('Cleaner', () => {
const client = await queue.client;
const keys = await client.keys(`${prefix}:${queue.name}:*`);

const suffixes = keys.map(key => key.split(':')[2]);
// Expected keys: meta, id, stalled-check, events, failed and job
expect(keys.length).to.be.eql(8);
for (const key of keys) {
const type = key.split(':')[2];
expect([
'meta',
'id',
'stalled-check',
'events',
'failed',
'marker',
tree.job.id!,
]).to.include(type);
}
expect(suffixes).to.include.members([
'meta',
'id',
'stalled-check',
'events',
'failed',
tree.job.id!,
]);

const parentState = await tree.job.getState();
expect(parentState).to.be.equal('failed');
Expand Down

0 comments on commit 0a72b19

Please sign in to comment.