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

test: ✅ Fix race conditions in integration tests #299

Merged
merged 20 commits into from
Dec 26, 2024

Conversation

ffarall
Copy link
Contributor

@ffarall ffarall commented Dec 23, 2024

In this PR:

  1. Fix race condition in skipTo waiting for proofs (eliminated sleeps).
  2. Fix race condition where there could have been multiple PaymentStreamCharged events in debt-collection.test.ts.
  3. Fix race condition where MSP didn't add a file to it's local File Storage in time in respond-multi-requests.test.ts.
  4. Remove redundant iterations in waitForTxInPool.
  5. Change file from smile.jpg to whatsup.jpg in bsp-threshold.test.ts to make it so that BSP_DOWN cannot immediately volunteer.
  6. Simplify logic in bsp-threshold.test.ts and make it deterministic which BSP should be volunteering first (that shouldn't change given that their IDs and the file keys of the files uploaded don't change ever).
  7. Fix race condition in bsp-threshold.test.ts where BSP was not yet synced with chain tip before waiting for volunteer.
  8. Wait for BSPs to catch up to chain tip in submit-proofs.test.ts.
  9. Add minimum check of number of txs in pool.
  10. Fix race condition in storage-capacity.test.ts where a transaction was submitted with the BSP key, but the BSP node had already submitted a transaction with the same nonce.

@ffarall ffarall requested a review from TDemeco December 23, 2024 16:50
Copy link
Contributor

@TDemeco TDemeco left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

test/util/bspNet/block.ts Outdated Show resolved Hide resolved
@ffarall ffarall changed the title test: ✅ Fix race condition in skipTo waiting for proof submissions test: ✅ Fix race conditions in integration tests Dec 23, 2024
@ffarall ffarall merged commit 1ad8d7a into main Dec 26, 2024
23 checks passed
@ffarall ffarall deleted the fix/submit-proof-test-race-condition branch December 26, 2024 19:36
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.

2 participants