From 1a378c31f8b04699ee53555506a5f2a6ea83721d Mon Sep 17 00:00:00 2001 From: Evan Gray Date: Tue, 31 Oct 2023 15:39:12 -0400 Subject: [PATCH] ci: rely on jest timeout for vaa retry --- .../__tests__/aptos-integration.ts | 24 ++++---------- .../token_bridge/__tests__/sui-integration.ts | 32 +++++-------------- .../token_bridge/__tests__/utils/helpers.ts | 4 +-- 3 files changed, 15 insertions(+), 45 deletions(-) diff --git a/sdk/js/src/token_bridge/__tests__/aptos-integration.ts b/sdk/js/src/token_bridge/__tests__/aptos-integration.ts index a6ff906bd..182737ae5 100644 --- a/sdk/js/src/token_bridge/__tests__/aptos-integration.ts +++ b/sdk/js/src/token_bridge/__tests__/aptos-integration.ts @@ -95,9 +95,7 @@ describe("Aptos SDK tests", () => { sequence!, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); expect(attestVAA).toBeTruthy(); @@ -162,9 +160,7 @@ describe("Aptos SDK tests", () => { sequence!, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); expect(transferVAA).toBeTruthy(); @@ -230,9 +226,7 @@ describe("Aptos SDK tests", () => { sequence, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); expect(attestVAA).toBeTruthy(); @@ -336,9 +330,7 @@ describe("Aptos SDK tests", () => { sequence, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); expect(transferVAA).toBeTruthy(); @@ -415,9 +407,7 @@ describe("Aptos SDK tests", () => { sequence!, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); expect(attestVAA).toBeTruthy(); @@ -485,9 +475,7 @@ describe("Aptos SDK tests", () => { sequence!, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); expect(transferVAA).toBeTruthy(); const { tokenTransferPayload } = parseTokenTransferVaa(transferVAA); diff --git a/sdk/js/src/token_bridge/__tests__/sui-integration.ts b/sdk/js/src/token_bridge/__tests__/sui-integration.ts index 4d0196bf4..b4579c930 100644 --- a/sdk/js/src/token_bridge/__tests__/sui-integration.ts +++ b/sdk/js/src/token_bridge/__tests__/sui-integration.ts @@ -173,9 +173,7 @@ describe("Sui SDK tests", () => { attestSequence, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); const slicedAttestVAA = sliceVAASignatures(attestVAA); console.log(Buffer.from(slicedAttestVAA).toString("hex")); @@ -340,9 +338,7 @@ describe("Sui SDK tests", () => { ethSequence, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); const slicedTransferFromEthVAA = sliceVAASignatures(transferFromEthVAA); expect(slicedTransferFromEthVAA).toBeTruthy(); @@ -417,9 +413,7 @@ describe("Sui SDK tests", () => { sequence, { transport: NodeHttpTransport(), - }, - 1000, - 5 + } ); expect(transferFromSuiVAA).toBeTruthy(); @@ -499,9 +493,7 @@ describe("Sui SDK tests", () => { attestSequence, { transport: NodeHttpTransport(), - }, - 1000, - 30 + } ); console.log(parseAttestMetaVaa(attestVAA)); expect(attestVAA).toBeTruthy(); @@ -561,9 +553,7 @@ describe("Sui SDK tests", () => { // sequence!, // { // transport: NodeHttpTransport(), - // }, - // 1000, - // 30 + // } // ); // // Redeem on Ethereum @@ -610,9 +600,7 @@ describe("Sui SDK tests", () => { // ethSequence, // { // transport: NodeHttpTransport(), - // }, - // 1000, - // 30 + // } // ); // const slicedVAA = sliceVAASignatures(ethTransferVAA); @@ -671,9 +659,7 @@ describe("Sui SDK tests", () => { attestSequence, { transport: NodeHttpTransport(), - }, - 1000, - 30 + } ); expect(attestVAA).toBeTruthy(); @@ -740,9 +726,7 @@ describe("Sui SDK tests", () => { sequence!, { transport: NodeHttpTransport(), - }, - 1000, - 30 + } ); const { tokenTransferPayload } = parseTokenTransferVaa(transferVAA); expect(tokenTransferPayload.toString()).toBe(payload.toString()); diff --git a/sdk/js/src/token_bridge/__tests__/utils/helpers.ts b/sdk/js/src/token_bridge/__tests__/utils/helpers.ts index a4787f608..72f5ff052 100644 --- a/sdk/js/src/token_bridge/__tests__/utils/helpers.ts +++ b/sdk/js/src/token_bridge/__tests__/utils/helpers.ts @@ -51,9 +51,7 @@ export async function getSignedVAABySequence( sequence, { transport: NodeHttpTransport(), //This should only be needed when running in node. - }, - 1000, //retryTimeout - 1000 //Maximum retry attempts + } ); return vaaBytes;