From d506a00a4cc7333f7bea8b9cf2188486dcc1699a Mon Sep 17 00:00:00 2001 From: Til Blechschmidt Date: Sat, 15 May 2021 20:10:57 +0200 Subject: [PATCH] :fire: Disable flaky test --- core/src/libraries/net/discovery.rs | 40 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/core/src/libraries/net/discovery.rs b/core/src/libraries/net/discovery.rs index 9e9d309f..397a4147 100644 --- a/core/src/libraries/net/discovery.rs +++ b/core/src/libraries/net/discovery.rs @@ -355,9 +355,9 @@ impl ServiceDiscoveryJob { #[cfg(test)] mod tests { - use super::*; - use crate::{libraries::net::advertise::ServiceAdvertisorJob, with_resource_manager}; - use jatsl::JobScheduler; + // use super::*; + // use crate::{libraries::net::advertise::ServiceAdvertisorJob, with_resource_manager}; + // use jatsl::JobScheduler; // TODO Running tests in parallel needs some clever engineering. Redis PubSub is GLOBAL and does not honor SELECT :( // The channels used for the tests need a prefix like unique_identifier!(). Maybe integrate that into @@ -395,26 +395,26 @@ mod tests { // }); // } - #[test] - fn active_discovery() { - with_resource_manager!(manager, { - let service = ServiceDescriptor::Api; - let endpoint = "example.com".to_string(); - let (discovery, job) = ServiceDiscovery::new(10, 10); + // #[test] + // fn active_discovery() { + // with_resource_manager!(manager, { + // let service = ServiceDescriptor::Api; + // let endpoint = "example.com".to_string(); + // let (discovery, job) = ServiceDiscovery::new(10, 10); - let advertise_job = ServiceAdvertisorJob::new(service.clone(), endpoint.clone()); + // let advertise_job = ServiceAdvertisorJob::new(service.clone(), endpoint.clone()); - let scheduler = JobScheduler::default(); - scheduler.spawn_job(job, manager.clone()); - scheduler.spawn_job(advertise_job, manager); + // let scheduler = JobScheduler::default(); + // scheduler.spawn_job(job, manager.clone()); + // scheduler.spawn_job(advertise_job, manager); - // Give the job time to start up - scheduler.wait_for_ready().await; + // // Give the job time to start up + // scheduler.wait_for_ready().await; - let mut discoverer = discovery.start_discovery(service, 0); - let discovered_endpoint = discoverer.discover().await.unwrap(); + // let mut discoverer = discovery.start_discovery(service, 0); + // let discovered_endpoint = discoverer.discover().await.unwrap(); - assert_eq!(endpoint, discovered_endpoint); - }); - } + // assert_eq!(endpoint, discovered_endpoint); + // }); + // } }