Skip to content

test(1781): assert token balance via mirror node (HIP-367) - #1785

Closed
radkomih wants to merge 4 commits into
hiero-ledger:mainfrom
radkomih:fix/1781-restore-token-balance-assertions
Closed

test(1781): assert token balance via mirror node (HIP-367)#1785
radkomih wants to merge 4 commits into
hiero-ledger:mainfrom
radkomih:fix/1781-restore-token-balance-assertions

Conversation

@radkomih

Copy link
Copy Markdown
Contributor

Description:

Restore the token balance and decimals assertions in TestIntegrationAccountBalanceQueryCanGetTokenBalance, which were previously commented out. Since HIP-367 removed token balances from the consensus AccountBalanceQuery response, the assertions now query the mirror node as the source of truth.

  • Add getTokenBalanceFromMirror test helper that fetches an account's token balance and decimals from the mirror REST API, with bounded retries to absorb propagation delay
  • Assert the operator's token balance (1_000_000) and decimals (18) via the mirror node instead of the consensus response

Related issue(s):

Fixes #1781

Notes for reviewer:

The consensus AccountBalanceQuery still runs to confirm the query succeeds, but token-level assertions are made against the mirror node since HIP-367 no longer returns token balances in the consensus response.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Rado M <radkomih@gmail.com>
@radkomih
radkomih requested review from a team as code owners July 21, 2026 08:24
@radkomih
radkomih requested review from Dosik13 and gsstoykov July 21, 2026 08:24
@lfdt-bot

lfdt-bot commented Jul 21, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@radkomih radkomih closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Intermediate]: Restore token balance assertions in AccountBalanceQuery e2e test via mirror node

2 participants