Skip to content

Conversation

@victorkstarkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

victorkstarkware commented Nov 10, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@victorkstarkware victorkstarkware force-pushed the 11-10-apollo_proc_macros_timed_test_macros branch 2 times, most recently from 396bc8b to 907bb53 Compare November 11, 2025 09:59
@victorkstarkware victorkstarkware force-pushed the 11-10-apollo_proc_macros_timed_test_macros branch 12 times, most recently from 069e68d to c0e0c10 Compare November 11, 2025 13:02
Copy link
Contributor

@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 4 files reviewed, 1 unresolved discussion


crates/apollo_proc_macros_tests/tests/timed_test.rs line 61 at r1 (raw file):

    tokio::time::sleep(Duration::from_millis(20)).await;
    assert!(value > 0);
}

Could you please add tests that are expected to fail (look for the #[should_panic] annotation) such that:

  1. some fail on the actual test content
  2. some fail on timeout

Code quote:

#[timed_rstest_tokio(150)]
#[case(1)]
#[case(2)]
async fn test_rstest_async_custom_limit(#[case] value: u32) {
    tokio::time::sleep(Duration::from_millis(20)).await;
    assert!(value > 0);
}

Copy link
Contributor

@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 4 files reviewed, 2 unresolved discussions (waiting on @victorkstarkware)


crates/apollo_proc_macros/src/lib.rs line 610 at r1 (raw file):

            Ok(_) => {
                let elapsed = start.elapsed();
                let elapsed_ms = elapsed.as_millis() as u64;

Why is this conversion needed?

Code quote:

let elapsed_ms = elapsed.as_millis() as u64;

Copy link
Contributor

@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 4 files reviewed, 3 unresolved discussions (waiting on @victorkstarkware)


crates/apollo_proc_macros/src/lib.rs line 622 at r1 (raw file):

            Err(_) => {
                let elapsed = start.elapsed();
                let elapsed_ms = elapsed.as_millis() as u64;

These two lines appear in both branches, please unify them (by calling them before the match statement)

Code quote:

                let elapsed = start.elapsed();
                let elapsed_ms = elapsed.as_millis() as u64;

@victorkstarkware victorkstarkware force-pushed the 11-10-apollo_proc_macros_timed_test_macros branch from c0e0c10 to 1abf29e Compare November 12, 2025 16:41
Copy link
Contributor Author

@victorkstarkware victorkstarkware 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 4 files reviewed, 3 unresolved discussions (waiting on @Itay-Tsabary-Starkware)


crates/apollo_proc_macros/src/lib.rs line 610 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

Why is this conversion needed?

time limit constant is given in ms


crates/apollo_proc_macros/src/lib.rs line 622 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

These two lines appear in both branches, please unify them (by calling them before the match statement)

Done.


crates/apollo_proc_macros_tests/tests/timed_test.rs line 61 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

Could you please add tests that are expected to fail (look for the #[should_panic] annotation) such that:

  1. some fail on the actual test content
  2. some fail on timeout

Done.

@victorkstarkware victorkstarkware force-pushed the 11-10-apollo_proc_macros_timed_test_macros branch 6 times, most recently from 358f47a to bd78fe0 Compare November 13, 2025 09:54
@victorkstarkware victorkstarkware force-pushed the 11-10-apollo_proc_macros_timed_test_macros branch from bd78fe0 to 5b7e27e Compare November 13, 2025 09:56
@victorkstarkware victorkstarkware force-pushed the 11-10-apollo_proc_macros_timed_test_macros branch from 5b7e27e to 1f1d01a Compare November 13, 2025 09:59
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