Skip to content

Commit ee33c88

Browse files
committed
chore: fix test hanging
1 parent 13eb817 commit ee33c88

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ export default class Owl<ScheduleType extends string> {
7373
return new Activity(this.activityRedis, onEvent, options);
7474
}
7575

76+
public async close() {
77+
await this.activityRedis?.quit();
78+
}
79+
7680
public async runMigrations() {
7781
const client = this.redisFactory();
7882
await migrate(client);

test/functional/support.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export function makeProducerEnv(
6868

6969
async function teardown() {
7070
env.redis.disconnect();
71+
await env.owl.close()
7172
await env.producer.close();
7273
}
7374

@@ -180,7 +181,6 @@ export function makeActivityEnv(backend: Backend, fail?: WorkerFailPredicate) {
180181

181182
activityEnv.teardown = async function teardown() {
182183
await workerTeardown();
183-
await activityEnv.activity.close();
184184
};
185185

186186
return activityEnv;

0 commit comments

Comments
 (0)