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

Tokio version 1.23 breaks the tests #2571

Closed
boraarslan opened this issue Dec 13, 2022 · 0 comments · Fixed by #2574
Closed

Tokio version 1.23 breaks the tests #2571

boraarslan opened this issue Dec 13, 2022 · 0 comments · Fixed by #2574

Comments

@boraarslan
Copy link
Member

Upgrading the Tokio version 1.23 breaks the tests: CI Run

Tests pass without a problem on macOS and some Linux distros but fail on other instances.

My first instinct was this PR being responsible: tokio-rs/tokio#5223 since on the test:
test_mailbox_send_with_backpressure_counter_no_backpressure_cleansheet we measure some backpressure on the zero capacity channels where we expect none:

        FAIL [   0.002s]                 quickwit-actors mailbox::tests::test_mailbox_send_with_backpressure_counter_no_backpressure_cleansheet

--- STDOUT:                              quickwit-actors mailbox::tests::test_mailbox_send_with_backpressure_counter_no_backpressure_cleansheet ---

running 1 test
test mailbox::tests::test_mailbox_send_with_backpressure_counter_no_backpressure_cleansheet ... FAILED

failures:

failures:
    mailbox::tests::test_mailbox_send_with_backpressure_counter_no_backpressure_cleansheet

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 48 filtered out; finished in 0.00s


--- STDERR:                              quickwit-actors mailbox::tests::test_mailbox_send_with_backpressure_counter_no_backpressure_cleansheet ---
thread 'mailbox::tests::test_mailbox_send_with_backpressure_counter_no_backpressure_cleansheet' panicked at 'assertion failed: `(left == right)`
  left: `15`,
 right: `0`', quickwit-actors/src/mailbox.rs:466:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

However, inserting tokio::time::sleep(Duration::ZERO).await; before sending the second message fixes the test. I am not sure what causes this, but my guess is context switch causes the task to resume after some time; in the meantime, the BackPressureActor processes the message, and the channel becomes empty again.

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 a pull request may close this issue.

1 participant