Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky tests #502

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Fix flaky tests #502

merged 2 commits into from
Nov 30, 2023

Conversation

nkramer44
Copy link
Collaborator

SubmitPaymentIT and TransactUsingDerivedKeySignatureServiceIT both use hard-coded source accounts to send transactions. In these tests, we fund the source account, get account_info for the account to get the account's sequence, and submit a transaction. This is fine when running ITs against a standalone rippled node, and even when running against a real network like testnet or devnet. However, our CI builds run in parallel, and we have more than one CI build running against testnet (reporting mode and clio mode). This sometimes results in test failures in these ITs due to getting a tefPAST_SEQ error when submitting the transaction. This happens because one test run submits its transaction between the time that the other test run gets the account's sequence and submits its transaction.

The fix here is simply to use random or non-deterministic keypairs/accounts in these tests.

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (76fa607) 91.28% compared to head (7a8f1ae) 91.28%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #502   +/-   ##
=========================================
  Coverage     91.28%   91.28%           
  Complexity     1666     1666           
=========================================
  Files           327      327           
  Lines          4648     4648           
  Branches        386      386           
=========================================
  Hits           4243     4243           
  Misses          275      275           
  Partials        130      130           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sappenin sappenin merged commit 45d33c7 into main Nov 30, 2023
19 checks passed
@sappenin sappenin deleted the nk/fix-tests branch November 30, 2023 20:49
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.

None yet

2 participants