From 484d2ea0cd765431e8017e42c53669e5bc6e8728 Mon Sep 17 00:00:00 2001 From: Chris Guimaraes Date: Tue, 19 Sep 2023 13:26:48 +0100 Subject: [PATCH] fix: flaky test --- src/tests-2.4/pox-3-delegate-aggregation.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tests-2.4/pox-3-delegate-aggregation.ts b/src/tests-2.4/pox-3-delegate-aggregation.ts index 86d64bb9..50491492 100644 --- a/src/tests-2.4/pox-3-delegate-aggregation.ts +++ b/src/tests-2.4/pox-3-delegate-aggregation.ts @@ -9,7 +9,7 @@ import { standByForPoxCycle, standByForPoxCycleEnd, standByForTxSuccess, - standByUntilBlock, + standByForAccountUnlock, testEnv, } from '../test-utils/test-helpers'; import { stxToMicroStx } from '../helpers'; @@ -428,9 +428,7 @@ describe('PoX-3 - Delegate aggregation increase operations', () => { }); test('Validate account balances are unlocked', async () => { - // wait another block to ensure next pox cycle is returned after - const curBlock = await testEnv.client.getInfo(); - await standByUntilBlock(curBlock.stacks_tip_height + 1); + await standByForAccountUnlock(delegateeAccount.stxAddr); // validate stacks-node balance const coreBalanceInfo = await testEnv.client.getAccount(delegateeAccount.stxAddr);