-
Notifications
You must be signed in to change notification settings - Fork 211
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
feat: allow multiple devimint clients with the same name #4193
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4193 +/- ##
=========================================
Coverage ? 57.81%
=========================================
Files ? 197
Lines ? 43427
Branches ? 0
=========================================
Hits ? 25109
Misses ? 18318
Partials ? 0 ☔ View full report in Codecov by Sentry. |
bcbca3f
to
972c2bd
Compare
Is this fundamentally sound? Two tests using same client at the same time seems like asking for trouble. |
it is not same client though, second one uses a different client dir. (foo-1) |
it lets you do
currently it error that client dir already exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is clever!
devimint/src/federation.rs
Outdated
} | ||
|
||
/// Open or create a [`Client`] that starts with a fresh state. | ||
pub async fn open_or_create(name: &str) -> Result<Client> { | ||
let client = Self { | ||
name: name.to_owned(), | ||
name: format!("{name}-0"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need for this function now, as create
work like it: it can't fail if the dir already exists. Also - since it doesn't go through the lock, it would be racy with crate
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now removed
OK. Makese sense and looks correct. :) |
972c2bd
to
637e68a
Compare
What's status here? |
637e68a
to
6d3e48c
Compare
6d3e48c
to
b8c0aa7
Compare
now CI is passing |
allow you to run latency tests twice on same test dir for example