Skip to content

Commit

Permalink
Cleanup redis after each test-suit
Browse files Browse the repository at this point in the history
  • Loading branch information
mugli committed Oct 4, 2019
1 parent 69df02b commit c97e50f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions __tests__/01_producer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('Producer', () => {

afterAll(async () => {
await producer._disconnect();
await redis.flushall();
await redis.disconnect();
});

Expand Down
2 changes: 2 additions & 0 deletions __tests__/02_consumer_cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ describe('Consumer Unit - Cleanup', () => {
for (const consumer of consumers) {
await consumer._disconnect();
}

await redis.flushall();
await redis.disconnect();
});

Expand Down
1 change: 1 addition & 0 deletions __tests__/03_consumer_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('Consumer Unit', () => {
for (const consumer of consumers) {
await consumer._disconnect();
}
await redis.flushall();
await redis.disconnect();
});

Expand Down

0 comments on commit c97e50f

Please sign in to comment.