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

feat: improve mempool_test debug print #427

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

giladchase
Copy link
Collaborator

@giladchase giladchase commented Jul 9, 2024

Previous assertion wasn't informative enough on fail.

commit-id:4b2c49c7


Stack:

⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.


This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.60%. Comparing base (53de2b0) to head (7ace004).

Additional details and impacted files
@@                Coverage Diff                 @@
##           spr/main/181fcd98     #427   +/-   ##
==================================================
  Coverage              83.60%   83.60%           
==================================================
  Files                     37       37           
  Lines                   1720     1720           
  Branches                1720     1720           
==================================================
  Hits                    1438     1438           
  Misses                   205      205           
  Partials                  77       77           

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

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase and @MohammadNassar1)


crates/mempool/src/mempool_test.rs line 63 at r1 (raw file):

    for (i, (expected_tx, mempool_tx)) in enumerate(zip_eq(expected_queue, mempool_txs)) {
        assert_eq!(expected_tx, *mempool_tx, "{i}'th tx in the queue doesn't equal the expected");

Are both transactions formatted into the error mesasge?

Suggestion:

Transaction {i} in the queue is not as expected

Copy link
Contributor

@MohammadNassar1 MohammadNassar1 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @giladchase)

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)

@giladchase giladchase force-pushed the spr/main/4b2c49c7 branch 2 times, most recently from c523204 to 977a990 Compare July 10, 2024 13:31
Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)

Copy link
Contributor

@MohammadNassar1 MohammadNassar1 left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase)

Previous assertion wasn't informative enough on fail.

commit-id:4b2c49c7
@giladchase giladchase changed the base branch from spr/main/181fcd98 to main July 10, 2024 14:34
Copy link
Collaborator Author

@giladchase giladchase left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @giladchase)

@giladchase giladchase merged commit a4de205 into main Jul 10, 2024
24 checks passed
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.

4 participants