Skip to content

Commit

Permalink
feat(health): add kademlia bootstrap healthcheck + fix test span logg…
Browse files Browse the repository at this point in the history
…ing (#2056)
  • Loading branch information
gurinderu committed Feb 5, 2024
1 parent d3e4855 commit c082231
Show file tree
Hide file tree
Showing 12 changed files with 288 additions and 184 deletions.
1 change: 1 addition & 0 deletions aquamarine/src/vm_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ impl<RT: AquaRuntime> VmPool<RT> {
pub fn poll(&mut self, cx: &mut Context<'_>) {
let creating_vms = match &mut self.creating_runtimes {
None => {
tracing::debug!("Starting creation {} AVMs", self.pool_size);
self.creating_runtimes = Some(
(0..self.pool_size)
.map(|id| (id, self.create_avm(cx)))
Expand Down
8 changes: 1 addition & 7 deletions crates/connected-client/src/connected_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use particle_protocol::Particle;
use serde_json::{Value as JValue, Value};
use tempfile::TempDir;
use test_constants::{
IDLE_CONNECTION_TIMEOUT, KAD_TIMEOUT, PARTICLE_TTL, SHORT_TIMEOUT, TIMEOUT, TRANSPORT_TIMEOUT,
IDLE_CONNECTION_TIMEOUT, PARTICLE_TTL, SHORT_TIMEOUT, TIMEOUT, TRANSPORT_TIMEOUT,
};

use crate::client::Client;
Expand All @@ -43,7 +43,6 @@ pub struct ConnectedClient {
pub node_address: Multiaddr,
pub timeout: Duration,
pub short_timeout: Duration,
pub kad_timeout: Duration,
pub local_vm: tokio::sync::OnceCell<tokio::sync::Mutex<AVM>>,
pub data_store: Arc<ParticleDataStore>,
pub particle_ttl: Duration,
Expand All @@ -59,10 +58,6 @@ impl ConnectedClient {
self.short_timeout
}

pub fn kad_timeout(&self) -> Duration {
self.kad_timeout
}

pub fn particle_ttl(&self) -> Duration {
self.particle_ttl
}
Expand Down Expand Up @@ -201,7 +196,6 @@ impl ConnectedClient {
node_address,
timeout: TIMEOUT,
short_timeout: SHORT_TIMEOUT,
kad_timeout: KAD_TIMEOUT,
local_vm,
data_store,
particle_ttl: particle_ttl.unwrap_or(Duration::from_millis(PARTICLE_TTL as u64)),
Expand Down
Loading

0 comments on commit c082231

Please sign in to comment.