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(tests-integration): add setup and state reader spawn to e2e integration test #1892

Closed
wants to merge 1 commit into from

Conversation

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

codecov bot commented Nov 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.32%. Comparing base (33204ec) to head (61f4e89).

Additional details and impacted files
@@                  Coverage Diff                  @@
##           spr/main/1efe8f36    #1892      +/-   ##
=====================================================
+ Coverage              29.31%   29.32%   +0.01%     
=====================================================
  Files                    264      264              
  Lines                  30655    30655              
  Branches               30655    30655              
=====================================================
+ Hits                    8986     8991       +5     
+ Misses                 20789    20783       -6     
- Partials                 880      881       +1     

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

Copy link
Contributor

@ArniStarkware ArniStarkware 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: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)


crates/tests-integration/tests/end_to_end_integration_test.rs line 41 at r1 (raw file):

    // TODO(Tsabary): pass path instead of temp dir.

    let (_node_config_path, _) = dump_config_file_changes(&config, required_params, &temp_dir);

Can this be more similar to how we do it in the end_to_end_flow_test where there is a IntegrationTestSetup.

Can we use the same object?

Suggestion:

    running_system = MyIntegrationTestSetup::new();

Copy link
Contributor Author

@Itay-Tsabary-Starkware Itay-Tsabary-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: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)


crates/tests-integration/tests/end_to_end_integration_test.rs line 41 at r1 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

Can this be more similar to how we do it in the end_to_end_flow_test where there is a IntegrationTestSetup.

Can we use the same object?

Not really; I'll write here succinctly and otherwise we can discuss.

This is the struc:

pub struct IntegrationTestSetup {
    pub task_executor: TokioExecutor,

    // Client for adding transactions to the sequencer node.
    pub add_tx_http_client: HttpTestClient,

    // Handlers for the storage files, maintained so the files are not deleted.
    pub batcher_storage_file_handle: TempDir,
    pub rpc_storage_file_handle: TempDir,

    // TODO(Arni): Remove batcher client once the consensus manager is integrated into the test.
    pub batcher_client: SharedBatcherClient,

    // Handle of the sequencer node.
    pub sequencer_node_handle: JoinHandle<Result<(), anyhow::Error>>,
}

task_executor is a (redundant) indirection for spawning the node from the current tokio runtime.
add_tx_http_client is reproduced
?_storage_file_handle are reproduced
batcher_client should not be available, you are not supposed to have access to internal node channels in integration test
sequencer_node_handle is only later created, after the node is spawned, i.e., after the storage handlers and the config are created

Copy link
Contributor

@ArniStarkware ArniStarkware 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 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)


crates/tests-integration/tests/end_to_end_integration_test.rs line 41 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

Not really; I'll write here succinctly and otherwise we can discuss.

This is the struc:

pub struct IntegrationTestSetup {
    pub task_executor: TokioExecutor,

    // Client for adding transactions to the sequencer node.
    pub add_tx_http_client: HttpTestClient,

    // Handlers for the storage files, maintained so the files are not deleted.
    pub batcher_storage_file_handle: TempDir,
    pub rpc_storage_file_handle: TempDir,

    // TODO(Arni): Remove batcher client once the consensus manager is integrated into the test.
    pub batcher_client: SharedBatcherClient,

    // Handle of the sequencer node.
    pub sequencer_node_handle: JoinHandle<Result<(), anyhow::Error>>,
}

task_executor is a (redundant) indirection for spawning the node from the current tokio runtime.
add_tx_http_client is reproduced
?_storage_file_handle are reproduced
batcher_client should not be available, you are not supposed to have access to internal node channels in integration test
sequencer_node_handle is only later created, after the node is spawned, i.e., after the storage handlers and the config are created

Discussed F2f.

@Itay-Tsabary-Starkware
Copy link
Contributor Author

✓ Commit merged in pull request #1895

@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants