Skip to content

Commit b58da6b

Browse files
authored
[EdgeDB] More unique test branch names (#3190)
1 parent c959079 commit b58da6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/utility/edgedb-setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const ephemeralEdgeDB = async () => {
1313

1414
await dropStale(db);
1515

16-
const branch = `test_${Date.now()}`;
16+
const branch = `test_${Date.now()}_${String(Math.random()).slice(2)}`;
1717

1818
await db.execute(`create schema branch ${branch} from ${main}`);
1919

@@ -34,7 +34,7 @@ async function dropStale(db: Client) {
3434
if (!name.startsWith('test_')) {
3535
return false;
3636
}
37-
const ts = Number(name.slice(5));
37+
const ts = Number(name.split('_')[1]);
3838
if (isNaN(ts)) {
3939
return false;
4040
}

0 commit comments

Comments
 (0)