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(starknet_state_sync): test state sync runner after refactor to p2p #2695

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AlonLStarkWare
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

github-actions bot commented Dec 16, 2024

Copy link

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [34.734 ms 34.999 ms 35.302 ms]
change: [+1.4442% +2.5274% +3.6317%] (p = 0.00 < 0.05)
Performance has regressed.
Found 25 outliers among 100 measurements (25.00%)
4 (4.00%) low severe
6 (6.00%) low mild
4 (4.00%) high mild
11 (11.00%) high severe

@AlonLStarkWare AlonLStarkWare force-pushed the alonl/refactor_p2p_state_sync_runner_tests branch from 3746d22 to 375c4bc Compare December 16, 2024 13:30
Copy link
Contributor

@ShahakShama ShahakShama 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 r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @AlonLStarkWare and @noamsp-starkware)


crates/starknet_state_sync/src/runner/test.rs line 20 at r1 (raw file):

#[test]
fn run_returns_when_sync_client_future_returns() {

Add one for server as well


crates/starknet_state_sync/src/runner/test.rs line 30 at r1 (raw file):

#[test]
fn run_returns_error_when_sync_server_future_returns() {

Keep the same order as the termination tests (network, client, server)

Copy link
Contributor Author

@AlonLStarkWare AlonLStarkWare 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 @noamsp-starkware and @ShahakShama)


crates/starknet_state_sync/src/runner/test.rs line 20 at r1 (raw file):

Previously, ShahakShama wrote…

Add one for server as well

Because the server is a future without a value unlike the client and network which return a result, there is only one flow to test for the server.

Copy link
Contributor

@ShahakShama ShahakShama 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 @AlonLStarkWare and @noamsp-starkware)


crates/starknet_state_sync/src/runner/test.rs line 30 at r1 (raw file):

#[test]
fn run_returns_error_when_sync_server_future_returns() {

You should fix the source code to return Ok(()) if the sync server component finished and change this test accordingly

Copy link
Contributor Author

@AlonLStarkWare AlonLStarkWare 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: 2 of 4 files reviewed, 1 unresolved discussion (waiting on @noamsp-starkware and @ShahakShama)


crates/starknet_state_sync/src/runner/test.rs line 30 at r1 (raw file):

Previously, ShahakShama wrote…

You should fix the source code to return Ok(()) if the sync server component finished and change this test accordingly

I don't really understand why but done

Copy link
Contributor

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AlonLStarkWare and @noamsp-starkware)


crates/starknet_state_sync/src/runner/test.rs line 30 at r1 (raw file):

Previously, AlonLStarkWare (Alon-Lukatch-Starkware) wrote…

I don't really understand why but done

Rename the test as well

why - There's no difference between this case and the sync client case. In both cases one future finishes so they should return the same

@AlonLStarkWare AlonLStarkWare force-pushed the alonl/refactor_p2p_state_sync_runner_tests branch from 81848a2 to c7975a5 Compare December 26, 2024 12:43
Copy link
Contributor Author

@AlonLStarkWare AlonLStarkWare 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: 2 of 4 files reviewed, 1 unresolved discussion (waiting on @noamsp-starkware and @ShahakShama)


crates/starknet_state_sync/src/runner/test.rs line 30 at r1 (raw file):

Previously, ShahakShama wrote…

Rename the test as well

why - There's no difference between this case and the sync client case. In both cases one future finishes so they should return the same

Done.

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.

3 participants