We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In some tests, we run the tracker, for example:
#[tokio::test] async fn should_fail_when_the_uploaded_param_is_invalid() { INIT.call_once(|| { tracing_stderr_init(LevelFilter::ERROR); }); let env = Started::new(&configuration::ephemeral().into()).await; let mut params = QueryBuilder::default().query().params(); let invalid_values = ["-1", "1.1", "a"]; for invalid_value in invalid_values { params.set("uploaded", invalid_value); let response = Client::new(*env.bind_address()).get(&format!("announce?{params}")).await; assert_bad_announce_request_error_response(response, "invalid param value").await; } env.stop().await; }
When we stop the env (env.stop().await) we should shut it down immediately. It does not make sense to wait 90 seconds for tests.
env.stop().await
#[instrument(skip(handle, rx_halt, message))] pub async fn graceful_shutdown(handle: axum_server::Handle, rx_halt: tokio::sync::oneshot::Receiver<Halted>, message: String) { shutdown_signal_with_message(rx_halt, message).await; tracing::debug!("Sending graceful shutdown signal"); handle.graceful_shutdown(Some(Duration::from_secs(90))); println!("!! shuting down in 90 seconds !!"); loop { sleep(Duration::from_secs(1)).await; tracing::info!("remaining alive connections: {}", handle.connection_count()); } }
cc @da2ce7
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In some tests, we run the tracker, for example:
When we stop the env (
env.stop().await
) we should shut it down immediately. It does not make sense to wait 90 seconds for tests.cc @da2ce7
The text was updated successfully, but these errors were encountered: