Skip to content

chore: RecordCreationSuite rework assertions#23168

Open
derektriley wants to merge 4 commits intomainfrom
23165-recordcreatesuite-rework
Open

chore: RecordCreationSuite rework assertions#23168
derektriley wants to merge 4 commits intomainfrom
23165-recordcreatesuite-rework

Conversation

@derektriley
Copy link
Contributor

Description:
This pull request refactors the RecordCreationSuite tests to simplify and improve the validation of transfer lists in transaction records. It removes balance snapshot assertions and replaces them with direct checks on the contents of the TransferList within transaction records. Additionally, it increases the retry limit for transaction record queries to improve test reliability.

Test refactoring and simplification:

  • Removed balance snapshot and account balance assertion steps from test cases in RecordCreationSuite, reducing test flakiness and focusing validation on transaction record contents.
  • Replaced previous balance assertions with direct validation of TransferList contents using including and includingDeduction matchers, ensuring that the correct fee splits and deductions are present in the transaction record.

Test reliability improvement:

  • Increased the retry limit for transaction record queries in HapiGetTxnRecord from 200 to 300, allowing up to 3 seconds for record retrieval and improving test stability.

Imports and cleanup:

  • Removed unused imports and obsolete constants, and added necessary imports for new assertion logic in RecordCreationSuite.

Related issue(s):

Fixes #23165

Notes for reviewer:

Checklist

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

Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
@derektriley derektriley added this to the v0.72 milestone Jan 29, 2026
@derektriley derektriley self-assigned this Jan 29, 2026
@derektriley derektriley requested review from a team as code owners January 29, 2026 16:45
@lfdt-bot
Copy link

lfdt-bot commented Jan 29, 2026

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

Status Scanner 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.

@codacy-production
Copy link

codacy-production bot commented Jan 29, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (071b4bd) 94447 75410 79.84%
Head commit (4d837ba) 94447 (+0) 75410 (+0) 79.84% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#23168) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #23168   +/-   ##
=========================================
  Coverage     75.91%   75.91%           
  Complexity    23589    23589           
=========================================
  Files          2556     2556           
  Lines         94632    94632           
  Branches      10093    10093           
=========================================
  Hits          71836    71836           
  Misses        19122    19122           
  Partials       3674     3674           

Impacted file tree graph

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

Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
petreze
petreze previously approved these changes Feb 2, 2026
Copy link
Contributor

@petreze petreze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems it failed in PR check, just saw that

Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
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.

RecordCreationSuite flakiness in CI

4 participants