mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-02-05 10:03:36 +00:00
Fix timeout in tests
This commit is contained in:
@@ -250,7 +250,8 @@ class TreeNode {
|
||||
// Try three times to wait for the node to expand.
|
||||
for (let i = 0; i < RETRY_COUNT; i++) {
|
||||
try {
|
||||
await tree.waitFor({ state: "visible" });
|
||||
// Use a longer timeout (30s) since expanding may require loading children from the server
|
||||
await tree.waitFor({ state: "visible", timeout: 30 * 1000 });
|
||||
// The tree has expanded, let's get out of here
|
||||
return true;
|
||||
} catch {
|
||||
|
||||
@@ -29,7 +29,7 @@ test.describe("Database with Shared Throughput", () => {
|
||||
});
|
||||
|
||||
test("Create database with shared manual throughput and verify Scale node in UI", async () => {
|
||||
test.setTimeout(120000); // 2 minutes timeout
|
||||
test.setTimeout(180000); // 3 minutes timeout
|
||||
// Create database with shared manual throughput (400 RU/s)
|
||||
dbContext = await createTestDB({ throughput: 400 });
|
||||
|
||||
@@ -47,6 +47,7 @@ test.describe("Database with Shared Throughput", () => {
|
||||
});
|
||||
|
||||
test("Add container to shared database without dedicated throughput", async () => {
|
||||
test.setTimeout(180000); // 3 minutes timeout
|
||||
// Create database with shared manual throughput
|
||||
dbContext = await createTestDB({ throughput: 400 });
|
||||
|
||||
@@ -100,6 +101,7 @@ test.describe("Database with Shared Throughput", () => {
|
||||
});
|
||||
|
||||
test("Scale shared database manual throughput", async () => {
|
||||
test.setTimeout(180000); // 3 minutes timeout
|
||||
// Create database with shared manual throughput (400 RU/s)
|
||||
dbContext = await createTestDB({ throughput: 400 });
|
||||
|
||||
@@ -125,6 +127,7 @@ test.describe("Database with Shared Throughput", () => {
|
||||
});
|
||||
|
||||
test("Scale shared database from manual to autoscale", async () => {
|
||||
test.setTimeout(180000); // 3 minutes timeout
|
||||
// Create database with shared manual throughput (400 RU/s)
|
||||
dbContext = await createTestDB({ throughput: 400 });
|
||||
|
||||
@@ -159,7 +162,7 @@ test.describe("Database with Shared Throughput", () => {
|
||||
});
|
||||
|
||||
test("Create database with shared autoscale throughput and verify Scale node in UI", async () => {
|
||||
test.setTimeout(120000); // 2 minutes timeout
|
||||
test.setTimeout(180000); // 3 minutes timeout
|
||||
|
||||
// Create database with shared autoscale throughput (max 1000 RU/s)
|
||||
dbContext = await createTestDB({ maxThroughput: 1000 });
|
||||
@@ -178,6 +181,7 @@ test.describe("Database with Shared Throughput", () => {
|
||||
});
|
||||
|
||||
test("Scale shared database autoscale throughput", async () => {
|
||||
test.setTimeout(180000); // 3 minutes timeout
|
||||
// Create database with shared autoscale throughput (max 1000 RU/s)
|
||||
dbContext = await createTestDB({ maxThroughput: 1000 });
|
||||
|
||||
@@ -203,6 +207,7 @@ test.describe("Database with Shared Throughput", () => {
|
||||
});
|
||||
|
||||
test("Scale shared database from autoscale to manual", async () => {
|
||||
test.setTimeout(180000); // 3 minutes timeout
|
||||
// Create database with shared autoscale throughput (max 1000 RU/s)
|
||||
dbContext = await createTestDB({ maxThroughput: 1000 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user