Skip to content

Commit

Permalink
mv use to only use when not ci_skip
Browse files Browse the repository at this point in the history
  • Loading branch information
zancas committed Mar 8, 2024
1 parent 84a5145 commit 5b2262b
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions darkside-tests/tests/network_interruption_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,18 @@ use std::{
collections::HashMap,
sync::{
atomic::{AtomicBool, Ordering},
Arc, Mutex,
Arc,
},
time::Duration,
};

use darkside_tests::{
constants::DARKSIDE_SEED,
utils::{
create_chainbuild_file, load_chainbuild_file, prepare_darksidewalletd,
scenarios::{DarksideScenario, DarksideSender},
DarksideHandler,
},
use darkside_tests::utils::{
create_chainbuild_file, load_chainbuild_file, prepare_darksidewalletd,

Check failure on line 11 in darkside-tests/tests/network_interruption_tests.rs

View workflow job for this annotation

GitHub Actions / test / Build test artifacts

unused import: `prepare_darksidewalletd`
scenarios::{DarksideScenario, DarksideSender},
};
use json::JsonValue;
use tokio::time::sleep;
use zingo_testutils::{scenarios::setup::ClientBuilder, start_proxy_and_connect_lightclient};
use zingoconfig::RegtestNetwork;
use zingo_testutils::start_proxy_and_connect_lightclient;
use zingolib::{
get_base_address,
lightclient::PoolBalances,
Expand All @@ -29,6 +24,10 @@ use zingolib::{
#[tokio::test]
#[cfg(not(feature = "ci_skip"))]
async fn interrupt_initial_tree_fetch() {
use darkside_tests::constants::DARKSIDE_SEED;
use darkside_tests::utils::DarksideHandler;
use zingo_testutils::scenarios::setup::ClientBuilder;
use zingoconfig::RegtestNetwork;
let darkside_handler = DarksideHandler::new(None);

let server_id = zingoconfig::construct_lightwalletd_uri(Some(format!(
Expand All @@ -45,7 +44,7 @@ async fn interrupt_initial_tree_fetch() {
let mut cond_log =
HashMap::<&'static str, Box<dyn Fn(Arc<AtomicBool>) + Send + Sync + 'static>>::new();
let (sender, receiver) = std::sync::mpsc::channel();
let sender = Arc::new(Mutex::new(sender));
let sender = Arc::new(std::sync::Mutex::new(sender));
cond_log.insert(
"get_tree_state",
Box::new(move |_online| {
Expand All @@ -63,7 +62,7 @@ async fn interrupt_initial_tree_fetch() {
let (proxy_handle, _proxy_status) =
start_proxy_and_connect_lightclient(&light_client, cond_log);

let receiver = Arc::new(Mutex::new(receiver));
let receiver = Arc::new(std::sync::Mutex::new(receiver));
println!("made receiver");
std::thread::spawn(move || {
receiver.lock().unwrap().recv().unwrap();
Expand Down

0 comments on commit 5b2262b

Please sign in to comment.