Skip to content

Commit fdca9f0

Browse files
committed
Extend integration test timeouts
1 parent 7dd518c commit fdca9f0

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/integration/catalog.serial.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ describe("Catalog API", () => {
216216
// If we get here, all retries failed
217217
console.log("All image upload attempts failed");
218218
throw lastError;
219-
}, 240_000);
219+
}, 360_000);
220220

221221
it("should test upsert catalog object", async () => {
222222
const coffee = createTestCatalogItem({
@@ -248,7 +248,7 @@ describe("Catalog API", () => {
248248

249249
const variation = catalogObject.itemData?.variations?.[0] as Square.CatalogObject.ItemVariation;
250250
expect(variation.itemVariationData?.name).toBe("Colombian Fair Trade");
251-
});
251+
}, 240_000);
252252

253253
it("should test catalog info", async () => {
254254
await sleep(2000); // Wait before info request
@@ -342,7 +342,7 @@ describe("Catalog API", () => {
342342
}, 240_000);
343343

344344
it("should test retrieve catalog object", async () => {
345-
await sleep(2000); // Wait before test start
345+
await sleep(5000); // Wait before test start to avoid rate limiting
346346

347347
// First create a catalog object
348348
const coffee = createTestCatalogItem();
@@ -357,7 +357,7 @@ describe("Catalog API", () => {
357357
},
358358
);
359359

360-
await sleep(2000); // Wait before retrieve
360+
await sleep(3000); // Wait before retrieve
361361

362362
// Then retrieve it
363363
const response = await client.catalog.object.get({
@@ -366,7 +366,7 @@ describe("Catalog API", () => {
366366
expect(response.object).toBeDefined();
367367
expect(response.object?.id).toBe(createResp.catalogObject?.id);
368368

369-
await sleep(2000); // Wait before cleanup
369+
await sleep(3000); // Wait before cleanup
370370

371371
// Cleanup
372372
await client.catalog.object.delete(
@@ -381,7 +381,7 @@ describe("Catalog API", () => {
381381
}, 240_000);
382382

383383
it("should test batch retrieve catalog objects", async () => {
384-
await sleep(2000); // Wait before batch retrieve
384+
await sleep(5000); // Wait before batch retrieve
385385

386386
// Use the IDs created in the batch upsert test
387387
const response = await client.catalog.batchGet({
@@ -396,7 +396,7 @@ describe("Catalog API", () => {
396396
}, 240_000);
397397

398398
it("should test update item taxes", async () => {
399-
await sleep(2000); // Wait before test start
399+
await sleep(5000); // Wait before test start
400400

401401
// First create a test item
402402
const item = createTestCatalogItem();
@@ -411,7 +411,7 @@ describe("Catalog API", () => {
411411
},
412412
);
413413

414-
await sleep(2000); // Wait before update
414+
await sleep(3000); // Wait before update
415415

416416
const response = await client.catalog.updateItemTaxes(
417417
{
@@ -426,7 +426,7 @@ describe("Catalog API", () => {
426426

427427
expect(response.updatedAt).toBeDefined();
428428

429-
await sleep(2000); // Wait before cleanup
429+
await sleep(3000); // Wait before cleanup
430430

431431
// Cleanup
432432
await client.catalog.object.delete(
@@ -441,7 +441,7 @@ describe("Catalog API", () => {
441441
}, 240_000);
442442

443443
it("should test update item modifier lists", async () => {
444-
await sleep(2000); // Wait before test start
444+
await sleep(5000); // Wait before test start
445445

446446
// First create a test item
447447
const item = createTestCatalogItem();
@@ -456,7 +456,7 @@ describe("Catalog API", () => {
456456
},
457457
);
458458

459-
await sleep(2000); // Wait before update
459+
await sleep(3000); // Wait before update
460460

461461
const response = await client.catalog.updateItemModifierLists(
462462
{
@@ -471,7 +471,7 @@ describe("Catalog API", () => {
471471

472472
expect(response.updatedAt).toBeDefined();
473473

474-
await sleep(2000); // Wait before cleanup
474+
await sleep(3000); // Wait before cleanup
475475

476476
// Cleanup
477477
await client.catalog.object.delete(

tests/integration/pagination.serial.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ describe("Pagination", () => {
139139
if (perPage != null) {
140140
expect(pagerCount).toEqual(iteratorCount);
141141
}
142-
}, 60_000);
142+
}, 120_000);
143143
});
144144
});

0 commit comments

Comments
 (0)