Wait on blob fetch before window, Seems to fix instability (#1304)

also cleanup ledger.
This commit is contained in:
sakridge 2018-09-21 18:56:20 -07:00 committed by GitHub
parent e87cac06da
commit 54b407b4ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -83,8 +83,8 @@ impl Replicator {
pub fn join(self) {
self.ncp.join().unwrap();
self.t_window.join().unwrap();
self.fetch_stage.join().unwrap();
self.t_window.join().unwrap();
self.store_ledger_stage.join().unwrap();
}
}
@ -98,6 +98,7 @@ mod tests {
use logger;
use replicator::Replicator;
use signature::{Keypair, KeypairUtil};
use std::fs::remove_dir_all;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::thread::sleep;
@ -177,5 +178,7 @@ mod tests {
exit.store(true, Ordering::Relaxed);
replicator.join();
leader.exit();
let _ignored = remove_dir_all(&leader_ledger_path);
let _ignored = remove_dir_all(&replicator_ledger_path);
}
}