Skip to content

Simplify weirdly broken test code #2134

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

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Simplify weirdly broken test code #2134

merged 1 commit into from
Jan 22, 2025

Conversation

djc
Copy link
Member

@djc djc commented Jan 21, 2025

#871 seems to have added a test with this code:

    let next_retire_prior_to = active_cid_num + 1;
    pair.client_conn_mut(client_ch).ping();
    // Server retires all valid remote CIDs
    pair.server_conn_mut(server_ch)
        .rotate_local_cid(next_retire_prior_to);
    pair.drive();
    assert!(!pair.client_conn_mut(client_ch).is_closed());
    assert!(!pair.server_conn_mut(server_ch).is_closed());
    assert_matches!(
        pair.client_conn_mut(client_ch).active_rem_cid_seq(),
        _next_retire_prior_to
    );

Note on the last line that _next_retire_prior_to is a new identifier, which does not actually reference the earlier binding next_retire_prior_to. Because this is is assert_matches!(), I think the intended semantics here are a little unclear, and this was probably be intended as assert_eq!(.., next_retire_prior_to).

@gretchenfrage
Copy link
Collaborator

Rebased and resolved merge conflict.

@gretchenfrage gretchenfrage added this pull request to the merge queue Jan 22, 2025
Merged via the queue into main with commit 2125b36 Jan 22, 2025
20 checks passed
@gretchenfrage gretchenfrage deleted the fix-test-match branch January 22, 2025 04:46
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.

2 participants