Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(aws-kms-adapter): flaky test fixed #1495

Merged
merged 14 commits into from
Nov 11, 2024
1 change: 1 addition & 0 deletions packages/aws-kms-adapter/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
coverageReporters: ['html', 'lcov', 'json'],
runner: 'groups',
reporters: ['default', 'jest-junit'],
coveragePathIgnorePatterns: ['/node_modules/', '/tests/'],
workerThreads: true,
coverageThreshold:
isUnitTest !== 'true'
Expand Down
14 changes: 14 additions & 0 deletions packages/aws-kms-adapter/tests/fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,20 @@ const addAddressToFeeDelegationWhitelist = async (
// Verify that the transfer transaction did not revert
expect(whitelistTransactionReceipt.reverted).toBe(false);

const [[contractAddress]] = (await contract.read.allowedRecipientsFor(
705n
)) as readonly [ReadonlyArray<`0x${string}`>];

if (
contractAddress !== undefined &&
contractAddress.toLowerCase() === TESTING_CONTRACT_ADDRESS
) {
console.log(
`Contract address ${contractAddress} is already an allowed recipient for`
);
return;
}

// Execute a 'addAllowedRecipientFor' transaction on the loaded contract
const whitelistRecipientResult =
await contract.transact.addAllowedRecipientFor(
Expand Down
Loading