When scheduling an event with a veyr short duration, it is possible to end up with an event for which the deadline is overdue at the moment of scheduling.
It results in a panic in the Instant arithmetic. It happened in CI with tarpaulin enabled.
---- scheduler::tests::test_scheduler_simple stdout ----
thread 'scheduler::tests::test_scheduler_simple' panicked at 'supplied instant is later than self', library/std/src/time.rs:273:48
stack backtrace:
0: rust_begin_unwind
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/panicking.rs:101:14
2: core::option::expect_failed
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/option.rs:1618:5
3: core::option::Option<T>::expect
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/option.rs:698:21
4: std::time::Instant::duration_since
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/time.rs:273:9
5: <std::time::Instant as core::ops::arith::Sub>::sub
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/time.rs:398:9
6: quickwit_actors::scheduler::Scheduler::schedule_next_timeout
at ./src/scheduler.rs:257:13
7: quickwit_actors::scheduler::Scheduler::process_schedule_event::{{closure}}
at ./src/scheduler.rs:178:13
8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
9: <quickwit_actors::scheduler::Scheduler as quickwit_actors::async_actor::AsyncActor>::process_message::{{closure}}
at ./src/scheduler.rs:143:17
10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
11: <core::pin::Pin<P> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/future.rs:119:9
12: quickwit_actors::async_actor::process_msg::{{closure}}
at ./src/async_actor.rs:136:13
13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
14: quickwit_actors::async_actor::async_actor_loop::{{closure}}
at ./src/async_actor.rs:169:27
15: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
16: quickwit_actors::async_actor::spawn_async_actor::{{closure}}
at ./src/async_actor.rs:101:27
17: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
18: tokio::runtime::task::core::CoreStage<T>::poll::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/core.rs:243:17
19: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/loom/std/unsafe_cell.rs:14:9
20: tokio::runtime::task::core::CoreStage<T>::poll
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/core.rs:233:13
21: tokio::runtime::task::harness::poll_future::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/harness.rs:438:23
22: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/panic/unwind_safe.rs:271:9
23: std::panicking::try::do_call
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panicking.rs:403:40
24: __rust_try
25: std::panicking::try
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panicking.rs:367:19
26: std::panic::catch_unwind
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panic.rs:129:14
27: tokio::runtime::task::harness::poll_future
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/harness.rs:425:19
28: tokio::runtime::task::harness::Harness<T,S>::poll_inner
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/harness.rs:89:9
29: tokio::runtime::task::harness::Harness<T,S>::poll
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/harness.rs:59:15
30: tokio::runtime::task::raw::poll
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/raw.rs:113:5
31: tokio::runtime::task::raw::RawTask::poll
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/raw.rs:70:18
32: tokio::runtime::task::Notified<S>::run
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/mod.rs:171:9
33: tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:254:73
34: tokio::coop::with_budget::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:106:9
35: std::thread::local::LocalKey<T>::try_with
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/thread/local.rs:399:16
36: std::thread::local::LocalKey<T>::with
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/thread/local.rs:375:9
37: tokio::coop::with_budget
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:99:5
38: tokio::coop::budget
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:76:5
39: tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:254:50
40: tokio::runtime::basic_scheduler::enter::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:323:29
41: tokio::macros::scoped_tls::ScopedKey<T>::set
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/macros/scoped_tls.rs:61:9
42: tokio::runtime::basic_scheduler::enter
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:323:5
43: tokio::runtime::basic_scheduler::Inner<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:202:9
44: tokio::runtime::basic_scheduler::InnerGuard<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:516:9
45: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:162:24
46: tokio::runtime::Runtime::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/mod.rs:450:46
47: quickwit_actors::scheduler::tests::test_scheduler_simple
at ./src/scheduler.rs:423:9
48: quickwit_actors::scheduler::tests::test_scheduler_simple::{{closure}}
at ./src/scheduler.rs:340:11
49: core::ops::function::FnOnce::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/ops/function.rs:227:5
50: core::ops::function::FnOnce::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'scheduler::tests::test_scheduler_simple' panicked at 'assertion failed: `(left == right)`
left: `SchedulerCounters { num_pending_events: 2, total_num_events: 2 }`,
right: `SchedulerCounters { num_pending_events: 1, total_num_events: 2 }`', quickwit-actors/src/scheduler.rs:379:9
stack backtrace:
0: rust_begin_unwind
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/panicking.rs:101:14
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/panicking.rs:140:5
4: quickwit_actors::scheduler::tests::test_scheduler_simple::{{closure}}
at ./src/scheduler.rs:379:9
5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
6: <core::pin::Pin<P> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/future.rs:119:9
7: tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:213:62
8: tokio::coop::with_budget::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:106:9
9: std::thread::local::LocalKey<T>::try_with
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/thread/local.rs:399:16
10: std::thread::local::LocalKey<T>::with
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/thread/local.rs:375:9
11: tokio::coop::with_budget
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:99:5
12: tokio::coop::budget
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:76:5
13: tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:213:39
14: tokio::runtime::basic_scheduler::enter::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:323:29
15: tokio::macros::scoped_tls::ScopedKey<T>::set
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/macros/scoped_tls.rs:61:9
16: tokio::runtime::basic_scheduler::enter
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:323:5
17: tokio::runtime::basic_scheduler::Inner<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:202:9
18: tokio::runtime::basic_scheduler::InnerGuard<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:516:9
19: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:162:24
20: tokio::runtime::Runtime::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/mod.rs:450:46
21: quickwit_actors::scheduler::tests::test_scheduler_simple
at ./src/scheduler.rs:423:9
22: quickwit_actors::scheduler::tests::test_scheduler_simple::{{closure}}
at ./src/scheduler.rs:340:11
23: core::ops::function::FnOnce::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/ops/function.rs:227:5
24: core::ops::function::FnOnce::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- scheduler::tests::test_scheduler_simple stdout ----
thread 'scheduler::tests::test_scheduler_simple' panicked at 'supplied instant is later than self', library/std/src/time.rs:273:48
stack backtrace:
0: rust_begin_unwind
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/panicking.rs:101:14
2: core::option::expect_failed
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/option.rs:1618:5
3: core::option::Option<T>::expect
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/option.rs:698:21
4: std::time::Instant::duration_since
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/time.rs:273:9
5: <std::time::Instant as core::ops::arith::Sub>::sub
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/time.rs:398:9
6: quickwit_actors::scheduler::Scheduler::schedule_next_timeout
at ./src/scheduler.rs:257:13
7: quickwit_actors::scheduler::Scheduler::process_schedule_event::{{closure}}
at ./src/scheduler.rs:178:13
8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
9: <quickwit_actors::scheduler::Scheduler as quickwit_actors::async_actor::AsyncActor>::process_message::{{closure}}
at ./src/scheduler.rs:143:17
10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
11: <core::pin::Pin<P> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/future.rs:119:9
12: quickwit_actors::async_actor::process_msg::{{closure}}
at ./src/async_actor.rs:136:13
13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
14: quickwit_actors::async_actor::async_actor_loop::{{closure}}
at ./src/async_actor.rs:169:27
15: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
16: quickwit_actors::async_actor::spawn_async_actor::{{closure}}
at ./src/async_actor.rs:101:27
17: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
18: tokio::runtime::task::core::CoreStage<T>::poll::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/core.rs:243:17
19: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/loom/std/unsafe_cell.rs:14:9
20: tokio::runtime::task::core::CoreStage<T>::poll
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/core.rs:233:13
21: tokio::runtime::task::harness::poll_future::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/harness.rs:438:23
22: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/panic/unwind_safe.rs:271:9
23: std::panicking::try::do_call
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panicking.rs:403:40
24: __rust_try
25: std::panicking::try
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panicking.rs:367:19
26: std::panic::catch_unwind
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panic.rs:129:14
27: tokio::runtime::task::harness::poll_future
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/harness.rs:425:19
28: tokio::runtime::task::harness::Harness<T,S>::poll_inner
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/harness.rs:89:9
29: tokio::runtime::task::harness::Harness<T,S>::poll
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/harness.rs:59:15
30: tokio::runtime::task::raw::poll
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/raw.rs:113:5
31: tokio::runtime::task::raw::RawTask::poll
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/raw.rs:70:18
32: tokio::runtime::task::Notified<S>::run
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/task/mod.rs:171:9
33: tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:254:73
34: tokio::coop::with_budget::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:106:9
35: std::thread::local::LocalKey<T>::try_with
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/thread/local.rs:399:16
36: std::thread::local::LocalKey<T>::with
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/thread/local.rs:375:9
37: tokio::coop::with_budget
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:99:5
38: tokio::coop::budget
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:76:5
39: tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:254:50
40: tokio::runtime::basic_scheduler::enter::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:323:29
41: tokio::macros::scoped_tls::ScopedKey<T>::set
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/macros/scoped_tls.rs:61:9
42: tokio::runtime::basic_scheduler::enter
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:323:5
43: tokio::runtime::basic_scheduler::Inner<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:202:9
44: tokio::runtime::basic_scheduler::InnerGuard<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:516:9
45: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:162:24
46: tokio::runtime::Runtime::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/mod.rs:450:46
47: quickwit_actors::scheduler::tests::test_scheduler_simple
at ./src/scheduler.rs:423:9
48: quickwit_actors::scheduler::tests::test_scheduler_simple::{{closure}}
at ./src/scheduler.rs:340:11
49: core::ops::function::FnOnce::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/ops/function.rs:227:5
50: core::ops::function::FnOnce::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'scheduler::tests::test_scheduler_simple' panicked at 'assertion failed: `(left == right)`
left: `SchedulerCounters { num_pending_events: 2, total_num_events: 2 }`,
right: `SchedulerCounters { num_pending_events: 1, total_num_events: 2 }`', quickwit-actors/src/scheduler.rs:379:9
stack backtrace:
0: rust_begin_unwind
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/panicking.rs:101:14
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/panicking.rs:140:5
4: quickwit_actors::scheduler::tests::test_scheduler_simple::{{closure}}
at ./src/scheduler.rs:379:9
5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/mod.rs:80:19
6: <core::pin::Pin<P> as core::future::future::Future>::poll
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/future/future.rs:119:9
7: tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:213:62
8: tokio::coop::with_budget::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:106:9
9: std::thread::local::LocalKey<T>::try_with
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/thread/local.rs:399:16
10: std::thread::local::LocalKey<T>::with
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/std/src/thread/local.rs:375:9
11: tokio::coop::with_budget
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:99:5
12: tokio::coop::budget
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/coop.rs:76:5
13: tokio::runtime::basic_scheduler::Inner<P>::block_on::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:213:39
14: tokio::runtime::basic_scheduler::enter::{{closure}}
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:323:29
15: tokio::macros::scoped_tls::ScopedKey<T>::set
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/macros/scoped_tls.rs:61:9
16: tokio::runtime::basic_scheduler::enter
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:323:5
17: tokio::runtime::basic_scheduler::Inner<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:202:9
18: tokio::runtime::basic_scheduler::InnerGuard<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:516:9
19: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/basic_scheduler.rs:162:24
20: tokio::runtime::Runtime::block_on
at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.8.1/src/runtime/mod.rs:450:46
21: quickwit_actors::scheduler::tests::test_scheduler_simple
at ./src/scheduler.rs:423:9
22: quickwit_actors::scheduler::tests::test_scheduler_simple::{{closure}}
at ./src/scheduler.rs:340:11
23: core::ops::function::FnOnce::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/ops/function.rs:227:5
24: core::ops::function::FnOnce::call_once
at /rustc/ad02dc46badee510bd3a2c093edf80fcaade91b1/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
When scheduling an event with a veyr short duration, it is possible to end up with an event for which the deadline is overdue at the moment of scheduling.
It results in a panic in the Instant arithmetic. It happened in CI with tarpaulin enabled.