diff --git a/test/sql/query.spec.ts b/test/sql/query.spec.ts index 7aa44174b..ff57f40c6 100644 --- a/test/sql/query.spec.ts +++ b/test/sql/query.spec.ts @@ -32,8 +32,8 @@ test.beforeEach("Open new query tab", async ({ page }) => { if (!process.env.CI) { test.afterAll("Delete Test Database", async () => { - await context?.dispose(); -}); + await context?.dispose(); + }); } test("Query results", async () => { diff --git a/test/sql/scaleAndSettings/scale.spec.ts b/test/sql/scaleAndSettings/scale.spec.ts index 62ed5a776..051812351 100644 --- a/test/sql/scaleAndSettings/scale.spec.ts +++ b/test/sql/scaleAndSettings/scale.spec.ts @@ -32,7 +32,6 @@ test.describe("Autoscale throughput", () => { }); } - test("Update autoscale max throughput", async () => { // Update autoscale max throughput await getThroughputInput(explorer, "autopilot").fill(TEST_AUTOSCALE_MAX_THROUGHPUT_RU_2K.toString()); @@ -101,13 +100,12 @@ test.describe("Manual throughput", () => { await scaleTab.click(); }); - if (!process.env.CI) { + if (!process.env.CI) { test.afterAll("Delete Test Database", async () => { await context?.dispose(); }); } - test("Update manual throughput", async () => { await getThroughputInput(explorer, "manual").fill(TEST_MANUAL_THROUGHPUT_RU_2K.toString()); await explorer.commandBarButton(CommandBarButton.Save).click(); diff --git a/test/testData.ts b/test/testData.ts index 44e68bb9b..9729a90b4 100644 --- a/test/testData.ts +++ b/test/testData.ts @@ -115,7 +115,6 @@ export async function createTestSQLContainer({ const { container } = await database.containers.createIfNotExists({ id: containerId, partitionKey, - throughput: 5000 }); if (includeTestData) { const batchCount = TestData.length / 100; diff --git a/utils/cleanupDBs.js b/utils/cleanupDBs.js index f54ad80c0..e3bb04b3c 100644 --- a/utils/cleanupDBs.js +++ b/utils/cleanupDBs.js @@ -74,20 +74,9 @@ async function main() { } } else if (account.kind === "GlobalDocumentDB") { const sqlDatabases = await client.sqlResources.listSqlDatabases(resourceGroupName, account.name); - // for (const database of sqlDatabases) { - // const timestamp = Number(database.resource._ts) * 1000; - // if (timestamp && timestamp < thirtyMinutesAgo) { - // await client.sqlResources.deleteSqlDatabase(resourceGroupName, account.name, database.name); - // console.log(`DELETED: ${account.name} | ${database.name} | Age: ${friendlyTime(Date.now() - timestamp)}`); - // } else { - // console.log(`SKIPPED: ${account.name} | ${database.name} | Age: ${friendlyTime(Date.now() - timestamp)}`); - // } - // } - const sqlDatabasesToDelete = sqlDatabases.map(async (database) => { await deleteWithRetry(client, database, account.name); }); - await Promise.all(sqlDatabasesToDelete); } }