Skip to content

Commit 693a608

Browse files
authored
fix(tests): clean up writer to prevent windows test failure (#514)
1 parent 8c5fc53 commit 693a608

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/mongodb-log-writer/src/mongo-log-manager.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ describe('MongoLogManager', function () {
115115

116116
const writer = await manager.createLogWriter();
117117
expect(writer.logFilePath as string).to.match(/custom_/);
118+
119+
writer.end();
120+
await once(writer, 'finish');
118121
});
119122

120123
it('cleans up old log files when requested', async function () {
@@ -577,7 +580,9 @@ describe('MongoLogManager', function () {
577580
},
578581
close: sinon.stub().resolves(),
579582
};
580-
const opendirStub = sinon.stub(fs, 'opendir').resolves(fakeDirHandle as any);
583+
const opendirStub = sinon
584+
.stub(fs, 'opendir')
585+
.resolves(fakeDirHandle as any);
581586

582587
retentionDays = 0.000001; // 86.4 ms
583588
const manager = new MongoLogManager({

0 commit comments

Comments
 (0)