| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | tor-rtmock: Change word in comment | Ian Jackson | 2024-04-02 | 1 | -1/+1 |
| | | | | | | This was incorrect usage, as pointed out in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2052#note_3012727 | ||||
| * | tor-rtmock: Use MockTimeCore in time.rs too (fmt) | Ian Jackson | 2024-03-25 | 1 | -6/+12 |
| | | |||||
| * | tor-rtmock: Use MockTimeCore in time.rs too | Ian Jackson | 2024-03-25 | 1 | -23/+18 |
| | | |||||
| * | tor-rtmock: Introduce MockTimeCore | Ian Jackson | 2024-03-25 | 2 | -25/+82 |
| | | | | | | | | | | | | | | It bothered me that when I added a `MockCoarseTimeProvider` to the mock time providers, I had to manually grep to check that there weren't places the time was updated where I ought to also update the coarse time. Prove that the code is right by hiding all the times together in a struct that prevents un-synchronised updates. This is part 1, where we move the fields from simple_time::State to the new struct. | ||||
| * | tor-rtmock: time_core: rename from coarse_time (fmt) | Ian Jackson | 2024-03-25 | 1 | -1/+1 |
| | | |||||
| * | tor-rtmock: time_core: rename from coarse_time | Ian Jackson | 2024-03-25 | 4 | -3/+3 |
| | | | | | | | We're going to put more in here. (Yes, I know we just invented this...) | ||||
| * | tor-rtmock: Rename coarsetime module to coarse_time | Ian Jackson | 2024-03-25 | 4 | -3/+3 |
| | | | | | | Modules with the same name as external crates don't work well with our MSRV. | ||||
| * | tor-rtcompat: Make Runtime imply CoarseTimeProvider, etc. (fmt) | Ian Jackson | 2024-03-25 | 1 | -2/+2 |
| | | |||||
| * | tor-rtcompat: Make Runtime imply CoarseTimeProvider, etc. | Ian Jackson | 2024-03-25 | 1 | -0/+8 |
| | | | | | We must also impl CoarseTimeProvider for mocked runtimes. | ||||
| * | tor-rtmock: impl CoarseTimeProvider for mocked time providers | Ian Jackson | 2024-03-25 | 4 | -1/+70 |
| | | |||||
| * | tor-rtmock: Implement from_real in terms of from_wallclock | Ian Jackson | 2024-03-25 | 1 | -1/+1 |
| | | | | | This reduces duplication a little. | ||||
| * | Run maint/add_warning. | Nick Mathewson | 2024-03-13 | 6 | -0/+6 |
| | | |||||
| * | deny clippy::unchecked_duration_subtraction | trinity-1686a | 2024-02-29 | 1 | -0/+1 |
| | | |||||
| * | clippy: Use Result::cloned in several places | Ian Jackson | 2024-01-31 | 1 | -1/+1 |
| | | |||||
| * | Fix typos | Dimitris Apostolou | 2024-01-08 | 1 | -1/+1 |
| | | |||||
| * | rtmock: Remove now-needless to_string calls. | Nick Mathewson | 2023-11-30 | 1 | -4/+0 |
| | | |||||
| * | tor-rtmock: get rid of unwrap() | Saksham Mittal | 2023-11-21 | 1 | -1/+1 |
| | | |||||
| * | tor-rtmock: handle Receiver result inside spawn_join() | Saksham Mittal | 2023-11-21 | 2 | -3/+3 |
| | | |||||
| * | tor-rtmock: use expect() instead | Saksham Mittal | 2023-11-21 | 1 | -1/+2 |
| | | |||||
| * | tor-rtmock: change return types to be less concrete | Saksham Mittal | 2023-11-21 | 2 | -2/+2 |
| | | |||||
| * | tor-rtmock: change return type of spawn_join() | Saksham Mittal | 2023-11-21 | 2 | -6/+6 |
| | | | | | | This makes it synchronous. The trait bounds on the return type have also been relaxed to not require Clone | ||||
| * | tor-rtmock: introduce spawn_join() for MockRuntime & MockExecutor | Saksham Mittal | 2023-11-21 | 2 | -0/+30 |
| | | | | | | | | This helps abstract away the need to create a oneshot channel in order to get the return value out of an async function when using MockRuntime. ref: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1727#note_2965352 | ||||
| * | tor-rtmock: MockRuntimeBuilder: new sleep_provider() setter | Ian Jackson | 2023-11-01 | 1 | -1/+10 |
| | | |||||
| * | tor-rtmock: simplify/reorganise MockRuntimeBuilder::build | Ian Jackson | 2023-11-01 | 1 | -4/+3 |
| | | | | | | Always reify a default SimpleMockTimeProvider, and then apply the starting_wallclock to it. This will make the next change fit. | ||||
| * | tor-rtmock: MockRuntime::test_with_various: Print what we're doing | Ian Jackson | 2023-10-16 | 1 | -1/+6 |
| | | | | | | | | | Without this, it can be a bit confusing since you just get the output (if any) of all the test runs, concatenated. It seems sensible to put the framing centrally. And, this would be helpful if the test fails for any reason. | ||||
| * | tor-rtmock: MockExecutor: Provide n_tasks accessor | Ian Jackson | 2023-10-16 | 1 | -0/+15 |
| | | |||||
| * | oneshot: Apply deferred rustfmt churn | Ian Jackson | 2023-10-11 | 1 | -1/+1 |
| | | | | | cargo fmt, precisely. | ||||
| * | oneshot: Use veneer in tor-rtmock | Ian Jackson | 2023-10-11 | 1 | -1/+1 |
| | | |||||
| * | tor-rtmock: simple_time: Don't export State | Ian Jackson | 2023-10-05 | 1 | -1/+1 |
| | | | | | This was a slip. | ||||
| * | tor-rtmock: MockSleepProvider docs: Move example (fmt) | Ian Jackson | 2023-10-05 | 1 | -12/+12 |
| | | | | | | Adding "/// " to every line causes rustfmt to have conniptions about the trailing whitespace. | ||||
| * | tor-rtmock: MockSleepProvider docs: Move example | Ian Jackson | 2023-10-05 | 1 | -0/+73 |
| | | | | | | | | | | | | This example demonstrates MockSleepRuntime, which we don't want to use in new tests. It's probably worth keeping it, though, to help with comprehension of existing tests. So move it. This does rather highlight the lack of good overall example/instructions for MockRuntime. | ||||
| * | tor-rtmock: simple_time: Rename `wakers` to `futures` (fmt) | Ian Jackson | 2023-10-05 | 1 | -1/+4 |
| | | |||||
| * | tor-rtmock: simple_time: Rename `wakers` to `futures` | Ian Jackson | 2023-10-05 | 1 | -11/+11 |
| | | | | | This is clearer, I think. | ||||
| * | tor-rtmock: simple_time: Rename `pq` to `unready` | Ian Jackson | 2023-10-05 | 1 | -13/+13 |
| | | | | | This is clearer, I think. | ||||
| * | tor-rtmock: simple_time: Expand on advance and task ordering | Ian Jackson | 2023-10-05 | 1 | -2/+8 |
| | | |||||
| * | tor-rtmock: simple_time: Clarify/correct comments about invariant | Ian Jackson | 2023-10-05 | 1 | -2/+2 |
| | | |||||
| * | tor-rtmock: Add deprecation warning to MockSleepRuntime | Ian Jackson | 2023-10-05 | 1 | -1/+7 |
| | | |||||
| * | tor-rtmock: MockSleepProvider docs: Move deprecation discussion | Ian Jackson | 2023-10-05 | 1 | -32/+38 |
| | | | | | | The module-level docs here are less visible and also not where most of the other stuff was. | ||||
| * | tor-rtmock: MockSleepProvider docs: Compare with SimpleMockTimeProvider | Ian Jackson | 2023-10-05 | 1 | -0/+22 |
| | | |||||
| * | tor-rtmock: simple_time: Clarify some things in time_until_next_timeout | Ian Jackson | 2023-10-05 | 1 | -0/+6 |
| | | |||||
| * | tor-rtmock: simple_time: Give formal names to the states | Ian Jackson | 2023-10-05 | 1 | -2/+21 |
| | | | | | And introduce a table showing the situations. | ||||
| * | tor-rtmock: simple_time: take() the waker when we wake | Ian Jackson | 2023-10-05 | 1 | -2/+5 |
| | | | | | | We don't need it any more; we won't call wake again. So, call .wake() rather than .wake_by_ref(). | ||||
| * | tor-rtmock: Provide SimpleTimeProvider: clarify .sleep() innards | Ian Jackson | 2023-10-03 | 1 | -4/+6 |
| | | | | | | | Making the SleepFuture first means we don't call .wake_any() with the other invariants violated. This doesn't actually matter with the code as it stands, but it's less confusing this way. | ||||
| * | tor-rtmock: MockRuntime: in advance_*, warn to stderr about looping | Ian Jackson | 2023-10-03 | 1 | -1/+21 |
| | | | | | | This helped me diagnose https://gitlab.torproject.org/tpo/core/arti/-/issues/1040 | ||||
| * | tor-rtmock: Break out advance_inner | Ian Jackson | 2023-10-03 | 1 | -10/+31 |
| | | | | | We're going to want to add something to it. | ||||
| * | tor-rtmock: Add a deprecation warning to MockSleepProvider | Ian Jackson | 2023-10-03 | 1 | -0/+13 |
| | | |||||
| * | tor-rtmock: Abolish deprecated Runtime::advance() | Ian Jackson | 2023-10-03 | 1 | -17/+0 |
| | | | | | | Now we're making breaking changes anyway, in or mock crate, it is a convenient time to get rid of this. | ||||
| * | tor-rtmock: Fix doc refs to advance_* | Ian Jackson | 2023-10-03 | 1 | -2/+2 |
| | | |||||
| * | tor-rtmock: Rename MockRuntime::jump_to to jump_wallclock | Ian Jackson | 2023-10-03 | 1 | -2/+2 |
| | | | | | | | This was named after the method from MockSleepRuntime. The name is confusing because it seems to imply it might do something to the monotonic time. | ||||
| * | tor-rtmock: Abolish just-introduced confusing type alias (fmt) | Ian Jackson | 2023-10-03 | 1 | -1/+1 |
| | | |||||
