mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-10 13:08:20 +00:00
remove test container throughput
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user