From 6f84f5ab7dc2f27505b38352bae2452d72b2061e Mon Sep 17 00:00:00 2001 From: anilhelvaci Date: Thu, 19 Dec 2024 21:15:20 +0300 Subject: [PATCH] fix(acceptance): fix flakey psm test Refs: #10728 --- a3p-integration/proposals/z:acceptance/psm.test.js | 3 +-- a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/a3p-integration/proposals/z:acceptance/psm.test.js b/a3p-integration/proposals/z:acceptance/psm.test.js index ae176ec51c8..36da819c04a 100644 --- a/a3p-integration/proposals/z:acceptance/psm.test.js +++ b/a3p-integration/proposals/z:acceptance/psm.test.js @@ -34,7 +34,6 @@ import { logRecord, maxMintBelowLimit, psmSwap, - sendOfferAgd, } from './test-lib/psm-lib.js'; import { getBalances } from './test-lib/utils.js'; @@ -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, { diff --git a/a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js b/a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js index 24c6a89ff88..14a6169024e 100644 --- a/a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js +++ b/a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js @@ -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 @@ -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', ) ); @@ -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);