fix: Apply suggestions from code review
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>pull/24376/head
parent
8be278aadd
commit
6b71fcacde
|
@ -36,7 +36,6 @@ use std::str;
|
||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
use std::u32;
|
use std::u32;
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
|
|
||||||
use tokio::time::Instant;
|
use tokio::time::Instant;
|
||||||
|
|
||||||
const URL_BASE: &str = "http://localhost:8080/api/v2";
|
const URL_BASE: &str = "http://localhost:8080/api/v2";
|
||||||
|
@ -626,8 +625,7 @@ impl TestServer {
|
||||||
async fn wait_until_ready(&self) {
|
async fn wait_until_ready(&self) {
|
||||||
// Poll the RPC and HTTP servers separately as they listen on
|
// Poll the RPC and HTTP servers separately as they listen on
|
||||||
// different ports but both need to be up for the test to run
|
// different ports but both need to be up for the test to run
|
||||||
async fn try_grpc_connect() {
|
let try_grpc_connect = async {
|
||||||
let mut interval = tokio::time::interval(Duration::from_millis(500));
|
|
||||||
loop {
|
loop {
|
||||||
match StorageClient::connect(GRPC_URL_BASE).await {
|
match StorageClient::connect(GRPC_URL_BASE).await {
|
||||||
Ok(storage_client) => {
|
Ok(storage_client) => {
|
||||||
|
@ -638,7 +636,7 @@ impl TestServer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
println!("Waiting for gRPM server to be up: {}", e);
|
println!("Waiting for gRPC server to be up: {}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
interval.tick().await;
|
interval.tick().await;
|
||||||
|
|
Loading…
Reference in New Issue