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

chore(sequencing): remove mock context from manager_test.rs #2524

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guy-starkware
Copy link
Contributor

@guy-starkware guy-starkware commented Dec 8, 2024

I've removed the MockTestContext from manager_test.rs and instead mved it to depend on the mock context in test_utils.rs.

@reviewable-StarkWare
Copy link

This change is Reviewable

@guy-starkware guy-starkware marked this pull request as ready for review December 8, 2024 12:32
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 859f44c to 98fba66 Compare December 8, 2024 12:43
Copy link

codecov bot commented Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 9.72%. Comparing base (e3165c4) to head (6d5e7bd).
Report is 817 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #2524       +/-   ##
==========================================
- Coverage   40.10%   9.72%   -30.39%     
==========================================
  Files          26      87       +61     
  Lines        1895   10491     +8596     
  Branches     1895   10491     +8596     
==========================================
+ Hits          760    1020      +260     
- Misses       1100    9434     +8334     
- Partials       35      37        +2     

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

@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from c39c276 to c2f07b7 Compare December 9, 2024 13:23
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 98fba66 to 786dfe2 Compare December 9, 2024 13:23
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from c2f07b7 to 8364862 Compare December 10, 2024 07:31
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 786dfe2 to 3e94c68 Compare December 10, 2024 07:31
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from 8364862 to 2b8cf29 Compare December 10, 2024 07:41
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 3e94c68 to 8b53dad Compare December 10, 2024 07:41
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from 2b8cf29 to dcfa88f Compare December 10, 2024 08:11
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 8b53dad to 22f54b1 Compare December 10, 2024 08:11
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from dcfa88f to 7afd08a Compare December 10, 2024 08:24
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 22f54b1 to 392ca7c Compare December 10, 2024 08:24
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from 7afd08a to 852e9f3 Compare December 10, 2024 08:25
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 392ca7c to 5873234 Compare December 10, 2024 08:25
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from 852e9f3 to c08f77b Compare December 10, 2024 09:53
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 5873234 to ffa5cb3 Compare December 10, 2024 09:53
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from c08f77b to a49ea50 Compare December 10, 2024 10:33
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch 2 times, most recently from 7037bab to bb55d27 Compare December 10, 2024 11:01
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch 2 times, most recently from b720f3f to 61eae2c Compare December 10, 2024 16:59
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from bb55d27 to b14dc7a Compare December 10, 2024 16:59
@guy-starkware guy-starkware force-pushed the guyn/streams/print_bad_tx branch from 61eae2c to 6a806b0 Compare December 11, 2024 16:52
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from b14dc7a to c38d6ec Compare December 11, 2024 16:52
@guy-starkware guy-starkware changed the base branch from guyn/streams/print_bad_tx to graphite-base/2524 December 11, 2024 19:28
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from c38d6ec to 336697d Compare December 11, 2024 19:29
@guy-starkware guy-starkware changed the base branch from graphite-base/2524 to main December 11, 2024 19:29
@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch 2 times, most recently from 6d5e7bd to 6a92643 Compare December 15, 2024 11:05
Copy link
Contributor

@asmaastarkware asmaastarkware 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 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @matan-starkware)

@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 6a92643 to 4a0bbd7 Compare December 16, 2024 09:06
Copy link
Contributor

@matan-starkware matan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @guy-starkware)


crates/sequencing/papyrus_consensus/src/test_utils.rs line 24 at r2 (raw file):

    Init(ProposalInit),
    Fin(ProposalFin),
}

Do we actually need Fin to be part of this enum?

Code quote:

#[derive(Debug, PartialEq, Clone)]
pub enum TestProposalPart {
    Init(ProposalInit),
    Fin(ProposalFin),
}

crates/sequencing/papyrus_consensus/src/test_utils.rs line 52 at r2 (raw file):

            _ => panic!("Invalid TestProposalPart conversion"),
        };
        <Vec<u8>>::try_from(init).expect("Invalid TestProposalPart conversion")

?

Suggestion:

        init.try_into().expect("Invalid TestProposalPart conversion")

Copy link
Contributor Author

@guy-starkware guy-starkware 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, 2 unresolved discussions (waiting on @matan-starkware)


crates/sequencing/papyrus_consensus/src/test_utils.rs line 24 at r2 (raw file):

Previously, matan-starkware wrote…

Do we actually need Fin to be part of this enum?

I guess we don't :)


crates/sequencing/papyrus_consensus/src/test_utils.rs line 52 at r2 (raw file):

Previously, matan-starkware wrote…

?

Done.

@guy-starkware guy-starkware force-pushed the guyn/streams/remove_mock_context branch from 4a0bbd7 to 385f3a6 Compare December 17, 2024 19:15
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