| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2843#note_3169975
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Stop referring to TCP streams in its documentation;
update other documentation to refer to NetStreamProvider
rather than TcpProvider.
|
| |
|
|
|
|
|
|
|
|
| |
It's redundant with the incoming() method (which turns the
TcpListener into a Stream of connections), and nothing actually used
it outside of tests.
Removing this method allows us to simplify our TcpListener code a
good deal, as can be seen by some of the implementations we removed
from our example and testing code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having this in the `tor-async-utils` crate prevents us from doing both
of the following without introducing a circular dependency:
* using it in `tor-rtmock` (which we currently do, particularly in
tests).
* using `tor-rtmock` to test things in `tor-async-utils`. We don't do
this yet, but it is generally sensible to do so. In particular we
want to move the `stream_peak` module there, which is currently tested
with `tor-rtmock`.
Moving this into its own crate avoids this circular dependency.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
We're going to put more in here.
(Yes, I know we just invented this...)
|
| |
|
|
|
| |
Modules with the same name as external crates don't work well with our
MSRV.
|
| | |
|
| | |
|
| |
|
|
| |
cargo fmt, precisely.
|
| | |
|
| |
|
|
|
| |
Adding "/// " to every line causes rustfmt to have conniptions about
the trailing whitespace.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
The module-level docs here are less visible and also not where most of
the other stuff was.
|
| | |
|
| | |
|
| |
|
|
| |
I have no idea why these became necessary.
|
| | |
|
| | |
|
| |
|
|
|
| |
Pick an arbitrary start time roughly now. This will do for many
tests.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- arti#445 highlighted the lack of good documentation around Arti's
multiple runtime support, as well as it being difficult to determine
what runtime was actually in use.
- Improve the documentation to solve the first problem.
- To solve the second problem, make Runtime require Debug (which is
arguably a good idea anyway, since it makes them easier to embed in
things), and print out the current runtime's Debug information when
arti is invoked with `--version`.
- (It also prints out other Cargo features, too!)
fixes arti#445
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This took some refactoring, so that I wouldn't need to define 9
different versions of the function. It also required that we change
the behavior of test_with_all_runtimes slightly, so that it asserts
on _any_ failure rather than asserting on most but returning Err()
for others. That in turn required changes to a few of its callers.
There's probably a better way to do all of this macro business, but
this is the best I could find.
|
| | |
|
| |
|
|
| |
These are my fault; I merged the wrong version of !102. :p
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of racily advancing time forward, this commit attempts to rework
how WaitFor works, such that it makes advances when all sleeper futures
that have been created have been polled (by handing the MockSleepRuntime
a Waker with which to wake up the WaitFor).
The above described mechanics work well enough for the double timeout
test, but fail in the presence of code that spawns asynchronous /
background tasks that must make progress before time is advanced for the
test to work properly. In order to deal with these cases, a set of APIs
are introduced in order to block time from being advanced until some
code has run, and a carveout added in order to permit small advances in
time where required.
(In some cases, code needed to be hacked up a bit in order to be made
properly testable using these APIs; the `MockablePlan` trait included in
here is somewhat unfortunate.)
This should fix arti#149.
|
| | |
|
|
|
This will cause some pain for now, but now is really the best time
to do this kind of thing.
|