Skip to content
Snippets Groups Projects
Commit 240fb981 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

fix(#125): fix: e2e tests were keeping the node running of failing tests

parent bb51146d
No related branches found
No related tags found
No related merge requests found
...@@ -87,6 +87,13 @@ impl Process { ...@@ -87,6 +87,13 @@ impl Process {
} }
} }
// Do not let the process keep running after the tests ended
impl Drop for Process {
fn drop(&mut self) {
self.kill()
}
}
pub const DISTANCE_ORACLE_LOCAL_PATH: &str = "../target/debug/distance-oracle"; pub const DISTANCE_ORACLE_LOCAL_PATH: &str = "../target/debug/distance-oracle";
const DUNITER_DOCKER_PATH: &str = "/usr/local/bin/duniter"; const DUNITER_DOCKER_PATH: &str = "/usr/local/bin/duniter";
const DUNITER_LOCAL_PATH: &str = "../target/debug/duniter"; const DUNITER_LOCAL_PATH: &str = "../target/debug/duniter";
......
...@@ -613,7 +613,7 @@ async fn main() { ...@@ -613,7 +613,7 @@ async fn main() {
if keep_running { if keep_running {
while running.load(Ordering::SeqCst) {} while running.load(Ordering::SeqCst) {}
} }
// Early kill (not waiting destructor) to save CPU/memory
if let Some(world) = maybe_world { if let Some(world) = maybe_world {
world.kill(); world.kill();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment