Fix flaky localnet e2e tests - #128
Merged
Merged
Conversation
Localnet Tests have been failing because Aptos Coin supply on recent localnets is an OptionalAggregator integer, not a table-backed aggregator. Also retry transient REST/faucet errors (including SEQUENCE_NUMBER_TOO_OLD) and make the example harness wait for the node and pick up localnet env vars. Co-authored-by: Greg Nazario <greg@gnazar.io>
gregnazario
marked this pull request as ready for review
August 13, 2026 03:10
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #128 +/- ##
==========================================
- Coverage 93.20% 93.07% -0.14%
==========================================
Files 56 56
Lines 5183 5239 +56
==========================================
+ Hits 4831 4876 +45
- Misses 352 363 +11
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Localnet CI has been red since early August because
examples.read_aggregatorassumed APTCoinInfo.supplyis always a table-backed aggregator. Recent localnets store that supply asOptionalAggregator.integerinstead:This also hardens the e2e path against the historical flakes from #31 (faucet
SEQUENCE_NUMBER_TOO_OLDand indexer lag).Changes:
RestClient.aggregator_valuereads either OptionalAggregator variant (aggregator table or integer) and no longer mutates the path list.fund_accountcalls on the same client.RestClient.wait_until_readypolls ledger info so integration tests wait out localnet startup.APTOS_INDEXER_URL=none(the previousAPTOS_INDEXER_CLIENTenv var was ignored).large_package_publisher; longer indexer poll intransfer_coin.Test Plan
make lintmake test(unit tests + behave specs)SEQUENCE_NUMBER_TOO_OLDretry, andwait_until_readymake integration_test/make examples)Related Links
test_read_aggreagtoronmainafter chore: update Python dependencies #127