Skip to content

Commit

Permalink
chore(deps): update rust crate test-context to 0.3 (#455)
Browse files Browse the repository at this point in the history
* chore(deps): update rust crate test-context to 0.3

* fix: dep update

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Chris Smith <[email protected]>
  • Loading branch information
renovate[bot] and chris13524 authored Apr 1, 2024
1 parent 1d4d230 commit b42c6e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ validator = { version = "0.17.0", features = ["derive"] }
k256 = "0.13.3"

[dev-dependencies]
test-context = "0.1"
test-context = "0.3"

[build-dependencies]
build-info-build = "0.0"
Expand Down
6 changes: 2 additions & 4 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use {
relay_api::{decode_message, decode_response_message},
RelayClient, RELAY_MESSAGE_DELIVERY_TIMEOUT,
},
async_trait::async_trait,
chrono::{DateTime, Duration, Utc},
futures::future::BoxFuture,
futures_util::StreamExt,
Expand Down Expand Up @@ -881,14 +880,13 @@ struct NotifyServerContext {
clock: Arc<MockClock>,
}

#[async_trait]
impl AsyncTestContext for NotifyServerContext {
async fn setup() -> Self {
let registry_mock_server = {
use wiremock::{
http::Method,
matchers::{method, path},
Mock, MockServer, ResponseTemplate,
Mock, ResponseTemplate,
};
let mock_server = MockServer::start().await;
Mock::given(method(Method::Get))
Expand Down Expand Up @@ -991,7 +989,7 @@ impl AsyncTestContext for NotifyServerContext {
}
}

async fn teardown(mut self) {
async fn teardown(self) {
self.shutdown.send(()).unwrap();
wait_for_socket_addr_to_be(self.socket_addr, true)
.await
Expand Down

0 comments on commit b42c6e6

Please sign in to comment.