Skip to content

Commit

Permalink
ci: rely on jest timeout for vaa retry
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Oct 31, 2023
1 parent b13ec6a commit 1a378c3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 45 deletions.
24 changes: 6 additions & 18 deletions sdk/js/src/token_bridge/__tests__/aptos-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ describe("Aptos SDK tests", () => {
sequence!,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
expect(attestVAA).toBeTruthy();

Expand Down Expand Up @@ -162,9 +160,7 @@ describe("Aptos SDK tests", () => {
sequence!,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
expect(transferVAA).toBeTruthy();

Expand Down Expand Up @@ -230,9 +226,7 @@ describe("Aptos SDK tests", () => {
sequence,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
expect(attestVAA).toBeTruthy();

Expand Down Expand Up @@ -336,9 +330,7 @@ describe("Aptos SDK tests", () => {
sequence,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
expect(transferVAA).toBeTruthy();

Expand Down Expand Up @@ -415,9 +407,7 @@ describe("Aptos SDK tests", () => {
sequence!,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
expect(attestVAA).toBeTruthy();

Expand Down Expand Up @@ -485,9 +475,7 @@ describe("Aptos SDK tests", () => {
sequence!,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
expect(transferVAA).toBeTruthy();
const { tokenTransferPayload } = parseTokenTransferVaa(transferVAA);
Expand Down
32 changes: 8 additions & 24 deletions sdk/js/src/token_bridge/__tests__/sui-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ describe("Sui SDK tests", () => {
attestSequence,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
const slicedAttestVAA = sliceVAASignatures(attestVAA);
console.log(Buffer.from(slicedAttestVAA).toString("hex"));
Expand Down Expand Up @@ -340,9 +338,7 @@ describe("Sui SDK tests", () => {
ethSequence,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
const slicedTransferFromEthVAA = sliceVAASignatures(transferFromEthVAA);
expect(slicedTransferFromEthVAA).toBeTruthy();
Expand Down Expand Up @@ -417,9 +413,7 @@ describe("Sui SDK tests", () => {
sequence,
{
transport: NodeHttpTransport(),
},
1000,
5
}
);
expect(transferFromSuiVAA).toBeTruthy();

Expand Down Expand Up @@ -499,9 +493,7 @@ describe("Sui SDK tests", () => {
attestSequence,
{
transport: NodeHttpTransport(),
},
1000,
30
}
);
console.log(parseAttestMetaVaa(attestVAA));
expect(attestVAA).toBeTruthy();
Expand Down Expand Up @@ -561,9 +553,7 @@ describe("Sui SDK tests", () => {
// sequence!,
// {
// transport: NodeHttpTransport(),
// },
// 1000,
// 30
// }
// );

// // Redeem on Ethereum
Expand Down Expand Up @@ -610,9 +600,7 @@ describe("Sui SDK tests", () => {
// ethSequence,
// {
// transport: NodeHttpTransport(),
// },
// 1000,
// 30
// }
// );
// const slicedVAA = sliceVAASignatures(ethTransferVAA);

Expand Down Expand Up @@ -671,9 +659,7 @@ describe("Sui SDK tests", () => {
attestSequence,
{
transport: NodeHttpTransport(),
},
1000,
30
}
);
expect(attestVAA).toBeTruthy();

Expand Down Expand Up @@ -740,9 +726,7 @@ describe("Sui SDK tests", () => {
sequence!,
{
transport: NodeHttpTransport(),
},
1000,
30
}
);
const { tokenTransferPayload } = parseTokenTransferVaa(transferVAA);
expect(tokenTransferPayload.toString()).toBe(payload.toString());
Expand Down
4 changes: 1 addition & 3 deletions sdk/js/src/token_bridge/__tests__/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1a378c3

Please sign in to comment.