Skip to content

Commit 6b9d31b

Browse files
committed
test: fix Windows file lock issue in validation tests
1 parent 2b1e123 commit 6b9d31b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

tests/mapreduce/test.view-cleanup-validation.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ describe('database name validation', function () {
9090
it('should allow valid database names with various formats', async function() {
9191
this.timeout(10000);
9292
const validDbNames = [
93-
'mydb',
94-
'my-db',
95-
'my_db',
96-
'my123db',
97-
'MyDb'
93+
'mydb-test-1',
94+
'my-db-test-2',
95+
'my_db-test-3',
96+
'my123db-test-4',
97+
'MyDb-test-5'
9898
];
9999

100100
for (const dbName of validDbNames) {
@@ -115,7 +115,15 @@ describe('database name validation', function () {
115115
const res = await db.query('test/test');
116116
res.rows.should.have.length(1);
117117

118-
await db.destroy();
118+
// Cleanup with error handling
119+
try {
120+
await db.destroy();
121+
} catch (e) {
122+
// Ignore cleanup errors on Windows
123+
if (!e.message.includes('being used by another process')) {
124+
throw e;
125+
}
126+
}
119127
}
120128
});
121129
});

0 commit comments

Comments
 (0)