Skip to content

Commit

Permalink
fix(acceptance): fix flakey psm test
Browse files Browse the repository at this point in the history
Refs: #10728
  • Loading branch information
anilhelvaci committed Dec 19, 2024
1 parent 7b7ceb9 commit 5e9b3bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 5e9b3bc

Please sign in to comment.