Give Travis a little more time to start threads

This commit is contained in:
Greg Fitzgerald 2018-03-26 22:02:05 -06:00
parent ee19b4f86e
commit c64a9fb456
1 changed files with 6 additions and 6 deletions

View File

@ -140,15 +140,15 @@ mod tests {
let exit = Arc::new(AtomicBool::new(false));
let acc = Arc::new(Mutex::new(AccountantSkel::new(acc, sink())));
let threads = AccountantSkel::serve(acc, addr, exit.clone()).unwrap();
sleep(Duration::from_millis(30));
sleep(Duration::from_millis(300));
let socket = UdpSocket::bind(send_addr).unwrap();
let mut acc = AccountantStub::new(addr, socket);
//let last_id = acc.get_last_id().unwrap();
//let sig = acc.transfer(500, &alice.keypair(), bob_pubkey, &last_id)
// .unwrap();
//acc.wait_on_signature(&sig, &last_id).unwrap();
//assert_eq!(acc.get_balance(&bob_pubkey).unwrap().unwrap(), 500);
let last_id = acc.get_last_id().unwrap();
let sig = acc.transfer(500, &alice.keypair(), bob_pubkey, &last_id)
.unwrap();
acc.wait_on_signature(&sig, &last_id).unwrap();
assert_eq!(acc.get_balance(&bob_pubkey).unwrap().unwrap(), 500);
exit.store(true, Ordering::Relaxed);
for t in threads {
t.join().expect("join");