Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(acceptance): fix flakey psm test #10747

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions a3p-integration/proposals/z:acceptance/psm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
logRecord,
maxMintBelowLimit,
psmSwap,
sendOfferAgd,
} from './test-lib/psm-lib.js';
import { getBalances } from './test-lib/utils.js';

Expand Down Expand Up @@ -163,7 +162,7 @@ test.serial('swap into IST using agd with default gas', async t => {
'--feePct',
wantMintedFeeVal,
],
{ ...psmSwapIo, sendOffer: sendOfferAgd },
psmSwapIo,
);

await checkSwapSucceeded(t, metricsBefore, balancesBefore, {
Expand Down
5 changes: 3 additions & 2 deletions a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ export const initializeNewUser = async (name, fund, io) => {
};

/**
* UNTIL https://github.com/Agoric/agoric-sdk/issues/10746 better to use {@link sendOfferAgd}
*
* Similar to
* https://github.com/Agoric/agoric-3-proposals/blob/422b163fecfcf025d53431caebf6d476778b5db3/packages/synthetic-chain/src/lib/commonUpgradeHelpers.ts#L123-L139
* However, for an address that is not provisioned, `agoric wallet send` is
Expand Down Expand Up @@ -478,7 +480,6 @@ export const sendOfferAgd = async (address, offerPromise) => {
[`--keyring-backend=test`, `--from=${address}`],
['tx', 'swingset', 'wallet-action', '--allow-spend', offer],
'--yes',
'-bblock',
'-ojson',
)
);
Expand Down Expand Up @@ -522,7 +523,7 @@ export const sendOfferAgd = async (address, offerPromise) => {
* }} io
*/
export const psmSwap = async (address, params, io) => {
const { now, sendOffer = sendOfferAgoric, ...waitIO } = io;
const { now, sendOffer = sendOfferAgd, ...waitIO } = io;
const offerId = `${address}-psm-swap-${now()}`;
const newParams = ['psm', ...params, '--offerId', offerId];
const offerPromise = executeCommand(agopsLocation, newParams);
Expand Down
Loading