diff --git a/integration_tests/src/client.rs b/integration_tests/src/client.rs index 54fc8550c..3524d7f85 100644 --- a/integration_tests/src/client.rs +++ b/integration_tests/src/client.rs @@ -3,7 +3,7 @@ use anyhow::anyhow; use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine}; use janus_client::{aggregator_hpke_config, default_http_client, Client, ClientParameters}; use janus_core::{time::RealClock, vdaf::VdafInstance}; -use janus_interop_binaries::ContainerLogsDropGuard; +use janus_interop_binaries::{get_rust_log_level, ContainerLogsDropGuard}; use janus_messages::{Duration, Role, TaskId}; use prio::{ codec::Encode, @@ -157,6 +157,7 @@ pub enum ClientBackend<'a> { impl<'a> ClientBackend<'a> { pub async fn build( &self, + test_name: &str, task_parameters: &TaskParameters, (leader_port, helper_port): (u16, u16), vdaf: V, @@ -177,6 +178,7 @@ impl<'a> ClientBackend<'a> { container_image, network, } => Ok(ClientImplementation::new_container( + test_name, container_client, container_image.clone(), network, @@ -257,6 +259,7 @@ where } pub fn new_container( + test_name: &str, container_client: &'d Cli, container_image: InteropClient, network: &str, @@ -265,12 +268,15 @@ where ) -> Self { let random_part = hex::encode(random::<[u8; 4]>()); let client_container_name = format!("client-{random_part}"); - let container = container_client.run( - RunnableImage::from(container_image) - .with_network(network) - .with_container_name(client_container_name), + let container = ContainerLogsDropGuard::new_janus( + test_name, + container_client.run( + RunnableImage::from(container_image) + .with_network(network) + .with_env_var(get_rust_log_level()) + .with_container_name(client_container_name), + ), ); - let container = ContainerLogsDropGuard::new_janus(container); let host_port = container.get_host_port_ipv4(8080); let http_client = reqwest::Client::new(); let (leader_aggregator_endpoint, helper_aggregator_endpoint) = task_parameters diff --git a/integration_tests/src/daphne.rs b/integration_tests/src/daphne.rs index 98688dca6..8530b0a5f 100644 --- a/integration_tests/src/daphne.rs +++ b/integration_tests/src/daphne.rs @@ -3,7 +3,7 @@ use crate::interop_api; use janus_aggregator_core::task::{test_util::TaskBuilder, Task}; use janus_interop_binaries::{ - test_util::await_http_server, ContainerLogsDropGuard, ContainerLogsSource, + get_rust_log_level, test_util::await_http_server, ContainerLogsDropGuard, ContainerLogsSource, }; use janus_messages::{Role, Time}; use testcontainers::{clients::Cli, images::generic::GenericImage, RunnableImage}; @@ -20,7 +20,12 @@ impl<'a> Daphne<'a> { /// Create and start a new hermetic Daphne test instance in the given Docker network, configured /// to service the given task. The aggregator port is also exposed to the host. - pub async fn new(container_client: &'a Cli, network: &str, task: &Task) -> Daphne<'a> { + pub async fn new( + test_name: &str, + container_client: &'a Cli, + network: &str, + task: &Task, + ) -> Daphne<'a> { let (endpoint, image_name_and_tag) = match task.role() { Role::Leader => panic!("A leader container image for Daphne is not yet available"), Role::Helper => ( @@ -34,8 +39,11 @@ impl<'a> Daphne<'a> { // Start the Daphne test container running. let runnable_image = RunnableImage::from(GenericImage::new(image_name, image_tag)) .with_network(network) + // Daphne uses the DAP_TRACING environment variable for its tracing subscriber. + .with_env_var(("DAP_TRACING", get_rust_log_level().1)) .with_container_name(endpoint.host_str().unwrap()); let daphne_container = ContainerLogsDropGuard::new( + test_name, container_client.run(runnable_image), ContainerLogsSource::Docker, ); diff --git a/integration_tests/src/janus.rs b/integration_tests/src/janus.rs index b9677e8e1..d57863691 100644 --- a/integration_tests/src/janus.rs +++ b/integration_tests/src/janus.rs @@ -3,7 +3,8 @@ use crate::interop_api; use janus_aggregator_core::task::Task; use janus_interop_binaries::{ - test_util::await_http_server, testcontainer::Aggregator, ContainerLogsDropGuard, + get_rust_log_level, test_util::await_http_server, testcontainer::Aggregator, + ContainerLogsDropGuard, }; use janus_messages::Role; use testcontainers::{clients::Cli, RunnableImage}; @@ -16,7 +17,12 @@ pub struct Janus<'a> { impl<'a> Janus<'a> { /// Create and start a new hermetic Janus test instance in the given Docker network, configured /// to service the given task. The aggregator port is also exposed to the host. - pub async fn new(container_client: &'a Cli, network: &str, task: &Task) -> Janus<'a> { + pub async fn new( + test_name: &str, + container_client: &'a Cli, + network: &str, + task: &Task, + ) -> Janus<'a> { // Start the Janus interop aggregator container running. let endpoint = match task.role() { Role::Leader => task.leader_aggregator_endpoint(), @@ -24,9 +30,11 @@ impl<'a> Janus<'a> { _ => panic!("unexpected task role"), }; let container = ContainerLogsDropGuard::new_janus( + test_name, container_client.run( RunnableImage::from(Aggregator::default()) .with_network(network) + .with_env_var(get_rust_log_level()) .with_container_name(endpoint.host_str().unwrap()), ), ); diff --git a/integration_tests/tests/common/mod.rs b/integration_tests/tests/common/mod.rs index 450473560..2182f4b5c 100644 --- a/integration_tests/tests/common/mod.rs +++ b/integration_tests/tests/common/mod.rs @@ -216,6 +216,7 @@ pub async fn submit_measurements_and_verify_aggregate_generic( } pub async fn submit_measurements_and_verify_aggregate( + test_name: &str, task_parameters: &TaskParameters, (leader_port, helper_port): (u16, u16), client_backend: &ClientBackend<'_>, @@ -242,7 +243,12 @@ pub async fn submit_measurements_and_verify_aggregate( }; let client_implementation = client_backend - .build(task_parameters, (leader_port, helper_port), vdaf.clone()) + .build( + test_name, + task_parameters, + (leader_port, helper_port), + vdaf.clone(), + ) .await .unwrap(); @@ -269,7 +275,12 @@ pub async fn submit_measurements_and_verify_aggregate( }; let client_implementation = client_backend - .build(task_parameters, (leader_port, helper_port), vdaf.clone()) + .build( + test_name, + task_parameters, + (leader_port, helper_port), + vdaf.clone(), + ) .await .unwrap(); @@ -312,7 +323,12 @@ pub async fn submit_measurements_and_verify_aggregate( }; let client_implementation = client_backend - .build(task_parameters, (leader_port, helper_port), vdaf.clone()) + .build( + test_name, + task_parameters, + (leader_port, helper_port), + vdaf.clone(), + ) .await .unwrap(); @@ -346,7 +362,12 @@ pub async fn submit_measurements_and_verify_aggregate( }; let client_implementation = client_backend - .build(task_parameters, (leader_port, helper_port), vdaf.clone()) + .build( + test_name, + task_parameters, + (leader_port, helper_port), + vdaf.clone(), + ) .await .unwrap(); @@ -388,7 +409,12 @@ pub async fn submit_measurements_and_verify_aggregate( }; let client_implementation = client_backend - .build(task_parameters, (leader_port, helper_port), vdaf.clone()) + .build( + test_name, + task_parameters, + (leader_port, helper_port), + vdaf.clone(), + ) .await .unwrap(); diff --git a/integration_tests/tests/daphne.rs b/integration_tests/tests/daphne.rs index 3127f165c..af1cae227 100644 --- a/integration_tests/tests/daphne.rs +++ b/integration_tests/tests/daphne.rs @@ -13,6 +13,7 @@ mod common; #[tokio::test(flavor = "multi_thread")] #[ignore = "Daphne does not yet publish a leader container image"] async fn daphne_janus() { + static TEST_NAME: &str = "daphne_janus"; install_test_trace_subscriber(); // Start servers. @@ -35,11 +36,12 @@ async fn daphne_janus() { .unwrap(); let container_client = container_client(); - let leader = Daphne::new(&container_client, &network, &leader_task).await; - let helper = Janus::new(&container_client, &network, &helper_task).await; + let leader = Daphne::new(TEST_NAME, &container_client, &network, &leader_task).await; + let helper = Janus::new(TEST_NAME, &container_client, &network, &helper_task).await; // Run the behavioral test. submit_measurements_and_verify_aggregate( + TEST_NAME, &task_parameters, (leader.port(), helper.port()), &ClientBackend::InProcess, @@ -51,6 +53,7 @@ async fn daphne_janus() { #[tokio::test(flavor = "multi_thread")] #[ignore = "Daphne does not currently support DAP-07 (issue #1669)"] async fn janus_daphne() { + static TEST_NAME: &str = "daphne_janus"; install_test_trace_subscriber(); // Start servers. @@ -73,11 +76,12 @@ async fn janus_daphne() { .unwrap(); let container_client = container_client(); - let leader = Janus::new(&container_client, &network, &leader_task).await; - let helper = Daphne::new(&container_client, &network, &helper_task).await; + let leader = Janus::new(TEST_NAME, &container_client, &network, &leader_task).await; + let helper = Daphne::new(TEST_NAME, &container_client, &network, &helper_task).await; // Run the behavioral test. submit_measurements_and_verify_aggregate( + TEST_NAME, &task_parameters, (leader.port(), helper.port()), &ClientBackend::InProcess, diff --git a/integration_tests/tests/divviup_ts.rs b/integration_tests/tests/divviup_ts.rs index 3766b1024..292588c00 100644 --- a/integration_tests/tests/divviup_ts.rs +++ b/integration_tests/tests/divviup_ts.rs @@ -15,12 +15,16 @@ use testcontainers::clients::Cli; mod common; -async fn run_divviup_ts_integration_test(container_client: &Cli, vdaf: VdafInstance) { +async fn run_divviup_ts_integration_test( + test_name: &str, + container_client: &Cli, + vdaf: VdafInstance, +) { let (task_parameters, leader_task, helper_task) = test_task_builders(vdaf, QueryType::TimeInterval); let network = generate_network_name(); - let leader = Janus::new(container_client, &network, &leader_task.build()).await; - let helper = Janus::new(container_client, &network, &helper_task.build()).await; + let leader = Janus::new(test_name, container_client, &network, &leader_task.build()).await; + let helper = Janus::new(test_name, container_client, &network, &helper_task.build()).await; let client_backend = ClientBackend::Container { container_client, @@ -28,6 +32,7 @@ async fn run_divviup_ts_integration_test(container_client: &Cli, vdaf: VdafInsta network: &network, }; submit_measurements_and_verify_aggregate( + test_name, &task_parameters, (leader.port(), helper.port()), &client_backend, @@ -40,7 +45,12 @@ async fn run_divviup_ts_integration_test(container_client: &Cli, vdaf: VdafInsta async fn janus_divviup_ts_count() { install_test_trace_subscriber(); - run_divviup_ts_integration_test(&container_client(), VdafInstance::Prio3Count).await; + run_divviup_ts_integration_test( + "janus_divviup_ts_count", + &container_client(), + VdafInstance::Prio3Count, + ) + .await; } #[tokio::test(flavor = "multi_thread")] @@ -48,7 +58,12 @@ async fn janus_divviup_ts_count() { async fn janus_divviup_ts_sum() { install_test_trace_subscriber(); - run_divviup_ts_integration_test(&container_client(), VdafInstance::Prio3Sum { bits: 8 }).await; + run_divviup_ts_integration_test( + "janus_divviup_ts_sum", + &container_client(), + VdafInstance::Prio3Sum { bits: 8 }, + ) + .await; } #[tokio::test(flavor = "multi_thread")] @@ -57,6 +72,7 @@ async fn janus_divviup_ts_histogram() { install_test_trace_subscriber(); run_divviup_ts_integration_test( + "janus_divviup_ts_histogram", &container_client(), VdafInstance::Prio3Histogram { length: 4, diff --git a/integration_tests/tests/in_cluster.rs b/integration_tests/tests/in_cluster.rs index 7d7678df1..3c3313293 100644 --- a/integration_tests/tests/in_cluster.rs +++ b/integration_tests/tests/in_cluster.rs @@ -268,6 +268,7 @@ async fn in_cluster_count() { // Run the behavioral test. submit_measurements_and_verify_aggregate( + "in_cluster_count", &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, @@ -285,6 +286,7 @@ async fn in_cluster_sum() { // Run the behavioral test. submit_measurements_and_verify_aggregate( + "in_cluster_sum", &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, @@ -308,6 +310,7 @@ async fn in_cluster_histogram() { // Run the behavioral test. submit_measurements_and_verify_aggregate( + "in_cluster_histogram", &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, @@ -331,6 +334,7 @@ async fn in_cluster_fixed_size() { // Run the behavioral test. submit_measurements_and_verify_aggregate( + "in_cluster_fixed_size", &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, diff --git a/integration_tests/tests/janus.rs b/integration_tests/tests/janus.rs index 396aa8071..d6180c717 100644 --- a/integration_tests/tests/janus.rs +++ b/integration_tests/tests/janus.rs @@ -26,6 +26,7 @@ impl<'a> JanusPair<'a> { /// Set up a new pair of containerized Janus test instances, and set up a new task in each using /// the given VDAF and query type. pub async fn new( + test_name: &str, container_client: &'a Cli, vdaf: VdafInstance, query_type: QueryType, @@ -33,8 +34,8 @@ impl<'a> JanusPair<'a> { let (task_parameters, leader_task, helper_task) = test_task_builders(vdaf, query_type); let network = generate_network_name(); - let leader = Janus::new(container_client, &network, &leader_task.build()).await; - let helper = Janus::new(container_client, &network, &helper_task.build()).await; + let leader = Janus::new(test_name, container_client, &network, &leader_task.build()).await; + let helper = Janus::new(test_name, container_client, &network, &helper_task.build()).await; Self { task_parameters, @@ -47,11 +48,13 @@ impl<'a> JanusPair<'a> { /// This test exercises Prio3Count with Janus as both the leader and the helper. #[tokio::test(flavor = "multi_thread")] async fn janus_janus_count() { + static TEST_NAME: &str = "janus_janus_count"; install_test_trace_subscriber(); // Start servers. let container_client = container_client(); let janus_pair = JanusPair::new( + TEST_NAME, &container_client, VdafInstance::Prio3Count, QueryType::TimeInterval, @@ -60,6 +63,7 @@ async fn janus_janus_count() { // Run the behavioral test. submit_measurements_and_verify_aggregate( + TEST_NAME, &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, @@ -70,11 +74,13 @@ async fn janus_janus_count() { /// This test exercises Prio3Sum with Janus as both the leader and the helper. #[tokio::test(flavor = "multi_thread")] async fn janus_janus_sum_16() { + static TEST_NAME: &str = "janus_janus_sum_16"; install_test_trace_subscriber(); // Start servers. let container_client = container_client(); let janus_pair = JanusPair::new( + TEST_NAME, &container_client, VdafInstance::Prio3Sum { bits: 16 }, QueryType::TimeInterval, @@ -83,6 +89,7 @@ async fn janus_janus_sum_16() { // Run the behavioral test. submit_measurements_and_verify_aggregate( + TEST_NAME, &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, @@ -93,11 +100,13 @@ async fn janus_janus_sum_16() { /// This test exercises Prio3Histogram with Janus as both the leader and the helper. #[tokio::test(flavor = "multi_thread")] async fn janus_janus_histogram_4_buckets() { + static TEST_NAME: &str = "janus_janus_histogram_4_buckets"; install_test_trace_subscriber(); // Start servers. let container_client = container_client(); let janus_pair = JanusPair::new( + TEST_NAME, &container_client, VdafInstance::Prio3Histogram { length: 4, @@ -109,6 +118,7 @@ async fn janus_janus_histogram_4_buckets() { // Run the behavioral test. submit_measurements_and_verify_aggregate( + TEST_NAME, &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, @@ -119,11 +129,13 @@ async fn janus_janus_histogram_4_buckets() { /// This test exercises the fixed-size query type with Janus as both the leader and the helper. #[tokio::test(flavor = "multi_thread")] async fn janus_janus_fixed_size() { + static TEST_NAME: &str = "janus_janus_fixed_size"; install_test_trace_subscriber(); // Start servers. let container_client = container_client(); let janus_pair = JanusPair::new( + TEST_NAME, &container_client, VdafInstance::Prio3Count, QueryType::FixedSize { @@ -135,6 +147,7 @@ async fn janus_janus_fixed_size() { // Run the behavioral test. submit_measurements_and_verify_aggregate( + TEST_NAME, &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, @@ -145,10 +158,12 @@ async fn janus_janus_fixed_size() { // This test exercises Prio3SumVec with Janus as both the leader and the helper. #[tokio::test(flavor = "multi_thread")] async fn janus_janus_sum_vec() { + static TEST_NAME: &str = "janus_janus_sum_vec"; install_test_trace_subscriber(); let container_client = container_client(); let janus_pair = JanusPair::new( + TEST_NAME, &container_client, VdafInstance::Prio3SumVec { bits: 16, @@ -160,6 +175,7 @@ async fn janus_janus_sum_vec() { .await; submit_measurements_and_verify_aggregate( + TEST_NAME, &janus_pair.task_parameters, (janus_pair.leader.port(), janus_pair.helper.port()), &ClientBackend::InProcess, diff --git a/interop_binaries/config/supervisord.conf b/interop_binaries/config/supervisord.conf index a193bdf90..d0fc9bf09 100644 --- a/interop_binaries/config/supervisord.conf +++ b/interop_binaries/config/supervisord.conf @@ -14,28 +14,28 @@ serverurl=unix:///tmp/janus-supervisor.sock [program:janus_interop_aggregator] command=/usr/local/bin/janus_interop_aggregator --config-file /etc/janus/janus_interop_aggregator.yaml autostart=false -environment=RUST_LOG=info,DATASTORE_KEYS=OSjfC8QVPATwO3uVJcAnTA +environment=DATASTORE_KEYS=OSjfC8QVPATwO3uVJcAnTA stdout_logfile=/logs/aggregator_stdout.log stderr_logfile=/logs/aggregator_stderr.log [program:aggregation_job_creator] command=/usr/local/bin/aggregation_job_creator --config-file /etc/janus/aggregation_job_creator.yaml autostart=false -environment=RUST_LOG=info,DATASTORE_KEYS=OSjfC8QVPATwO3uVJcAnTA +environment=DATASTORE_KEYS=OSjfC8QVPATwO3uVJcAnTA stdout_logfile=/logs/aggregation_job_creator_stdout.log stderr_logfile=/logs/aggregation_job_creator_stderr.log [program:aggregation_job_driver] command=/usr/local/bin/aggregation_job_driver --config-file /etc/janus/aggregation_job_driver.yaml autostart=false -environment=RUST_LOG=info,DATASTORE_KEYS=OSjfC8QVPATwO3uVJcAnTA +environment=DATASTORE_KEYS=OSjfC8QVPATwO3uVJcAnTA stdout_logfile=/logs/aggregation_job_driver_stdout.log stderr_logfile=/logs/aggregation_job_driver_stderr.log [program:collection_job_driver] command=/usr/local/bin/collection_job_driver --config-file /etc/janus/collection_job_driver.yaml autostart=false -environment=RUST_LOG=info,DATASTORE_KEYS=OSjfC8QVPATwO3uVJcAnTA +environment=DATASTORE_KEYS=OSjfC8QVPATwO3uVJcAnTA stdout_logfile=/logs/collection_job_driver_stdout.log stderr_logfile=/logs/collection_job_driver_stderr.log @@ -50,6 +50,5 @@ stderr_logfile=/logs/postgres_stderr.log command=/usr/local/bin/setup.sh autostart=true autorestart=false -environment=RUST_LOG=info stdout_logfile=/logs/setup_stdout.log stderr_logfile=/logs/setup_stderr.log diff --git a/interop_binaries/src/lib.rs b/interop_binaries/src/lib.rs index 85d252e52..c96bab270 100644 --- a/interop_binaries/src/lib.rs +++ b/interop_binaries/src/lib.rs @@ -23,7 +23,6 @@ use std::{ process::{Command, Stdio}, str::FromStr, sync::Arc, - thread::panicking, }; use testcontainers::{Container, Image}; use tokio::sync::Mutex; @@ -399,6 +398,7 @@ struct ContainerInspectEntry { } pub struct ContainerLogsDropGuard<'d, I: Image> { + test_name: String, container: Container<'d, I>, source: ContainerLogsSource, } @@ -411,12 +411,24 @@ pub enum ContainerLogsSource { } impl<'d, I: Image> ContainerLogsDropGuard<'d, I> { - pub fn new(container: Container, source: ContainerLogsSource) -> ContainerLogsDropGuard { - ContainerLogsDropGuard { container, source } + pub fn new( + test_name: &str, + container: Container<'d, I>, + source: ContainerLogsSource, + ) -> ContainerLogsDropGuard<'d, I> { + ContainerLogsDropGuard { + test_name: test_name.into(), + container, + source, + } } - pub fn new_janus(container: Container) -> ContainerLogsDropGuard { + pub fn new_janus( + test_name: &str, + container: Container<'d, I>, + ) -> ContainerLogsDropGuard<'d, I> { ContainerLogsDropGuard { + test_name: test_name.into(), container, source: ContainerLogsSource::Path("/logs".to_string()), } @@ -425,16 +437,11 @@ impl<'d, I: Image> ContainerLogsDropGuard<'d, I> { impl<'d, I: Image> Drop for ContainerLogsDropGuard<'d, I> { fn drop(&mut self) { - if !panicking() { - return; - } - // If we're panicking then we're probably in the middle of test failure. In this case, - // export logs if log_export_path() suggests doing so. - // // The unwraps in this code block would induce a double panic, but we accept this risk // since it happens only in test code. This is also our main method of debugging // integration tests, so if it's broken we should be alerted and have it fixed ASAP. if let Some(base_dir) = log_export_path() { + let base_dir = base_dir.join(&self.test_name); create_dir_all(&base_dir).expect("could not create log output directory"); let id = self.container.id(); @@ -531,6 +538,15 @@ impl Default for Keyring { } } +/// Returns the environment variable RUST_LOG. If it's unset or otherwise invalid, return the +/// default value of "info". +pub fn get_rust_log_level() -> (&'static str, String) { + ( + "RUST_LOG", + env::var("RUST_LOG").unwrap_or("info".to_string()), + ) +} + #[cfg(feature = "test-util")] pub mod test_util { use backoff::{future::retry, ExponentialBackoff}; diff --git a/interop_binaries/tests/end_to_end.rs b/interop_binaries/tests/end_to_end.rs index a49a20287..da6839130 100644 --- a/interop_binaries/tests/end_to_end.rs +++ b/interop_binaries/tests/end_to_end.rs @@ -7,6 +7,7 @@ use janus_core::{ vdaf::VERIFY_KEY_LENGTH, }; use janus_interop_binaries::{ + get_rust_log_level, test_util::{await_ready_ok, generate_network_name, generate_unique_name}, testcontainer::{Aggregator, Client, Collector}, ContainerLogsDropGuard, @@ -38,6 +39,7 @@ enum QueryKind { /// interoperation test binaries, and return the aggregate result. This follows the outline of /// the "Test Runner Operation" section in draft-dcook-ppm-dap-interop-test-design. async fn run( + test_name: &str, query_kind: QueryKind, vdaf_object: serde_json::Value, measurements: &[serde_json::Value], @@ -61,9 +63,11 @@ async fn run( let network = generate_network_name(); let client_container = ContainerLogsDropGuard::new_janus( + test_name, container_client.run( RunnableImage::from(Client::default()) .with_network(&network) + .with_env_var(get_rust_log_level()) .with_container_name(generate_unique_name("client")), ), ); @@ -71,9 +75,11 @@ async fn run( let leader_name = generate_unique_name("leader"); let leader_container = ContainerLogsDropGuard::new_janus( + test_name, container_client.run( RunnableImage::from(Aggregator::default()) .with_network(&network) + .with_env_var(get_rust_log_level()) .with_container_name(leader_name.clone()), ), ); @@ -81,18 +87,22 @@ async fn run( let helper_name = generate_unique_name("helper"); let helper_container = ContainerLogsDropGuard::new_janus( + test_name, container_client.run( RunnableImage::from(Aggregator::default()) .with_network(&network) + .with_env_var(get_rust_log_level()) .with_container_name(helper_name.clone()), ), ); let helper_port = helper_container.get_host_port_ipv4(Aggregator::INTERNAL_SERVING_PORT); let collector_container = ContainerLogsDropGuard::new_janus( + test_name, container_client.run( RunnableImage::from(Collector::default()) .with_network(&network) + .with_env_var(get_rust_log_level()) .with_container_name(generate_unique_name("collector")), ), ); @@ -569,6 +579,7 @@ async fn run( #[tokio::test] async fn e2e_prio3_count() { let result = run( + "e2e_prio3_count", QueryKind::TimeInterval, json!({"type": "Prio3Count"}), &[ @@ -600,6 +611,7 @@ async fn e2e_prio3_count() { #[tokio::test] async fn e2e_prio3_sum() { let result = run( + "e2e_prio3_sum", QueryKind::TimeInterval, json!({"type": "Prio3Sum", "bits": "64"}), &[ @@ -620,6 +632,7 @@ async fn e2e_prio3_sum() { #[tokio::test] async fn e2e_prio3_sum_vec() { let result = run( + "e2e_prio3_sum_vec", QueryKind::TimeInterval, json!({ "type": "Prio3SumVec", @@ -644,6 +657,7 @@ async fn e2e_prio3_sum_vec() { #[tokio::test] async fn e2e_prio3_histogram() { let result = run( + "e2e_prio3_histogram", QueryKind::TimeInterval, json!({ "type": "Prio3Histogram", @@ -675,6 +689,7 @@ async fn e2e_prio3_fixed16vec() { let fp16_8_inv = fixed!(0.125: I1F15); let fp16_16_inv = fixed!(0.0625: I1F15); let result = run( + "e2e_prio3_fixed16vec", QueryKind::TimeInterval, json!({"type": "Prio3FixedPoint16BitBoundedL2VecSum", "length": "3"}), &[ @@ -711,6 +726,7 @@ async fn e2e_prio3_fixed32vec() { let fp32_8_inv = fixed!(0.125: I1F31); let fp32_16_inv = fixed!(0.0625: I1F31); let result = run( + "e2e_prio3_fixed32vec", QueryKind::TimeInterval, json!({"type": "Prio3FixedPoint32BitBoundedL2VecSum", "length": "3"}), &[ @@ -747,6 +763,7 @@ async fn e2e_prio3_fixed64vec() { let fp64_8_inv = fixed!(0.125: I1F63); let fp64_16_inv = fixed!(0.0625: I1F63); let result = run( + "e2e_prio3_fixed64vec", QueryKind::TimeInterval, json!({"type": "Prio3FixedPoint64BitBoundedL2VecSum", "length": "3"}), &[ @@ -783,6 +800,7 @@ async fn e2e_prio3_fixed16vec_fixed_size() { let fp16_8_inv = fixed!(0.125: I1F15); let fp16_16_inv = fixed!(0.0625: I1F15); let result = run( + "e2e_prio3_fixed16vec_fixed_size", QueryKind::FixedSize, json!({"type": "Prio3FixedPoint16BitBoundedL2VecSum", "length": "3"}), &[ @@ -819,6 +837,7 @@ async fn e2e_prio3_fixed32vec_fixed_size() { let fp32_8_inv = fixed!(0.125: I1F31); let fp32_16_inv = fixed!(0.0625: I1F31); let result = run( + "e2e_prio3_fixed32vec_fixed_size", QueryKind::FixedSize, json!({"type": "Prio3FixedPoint32BitBoundedL2VecSum", "length": "3"}), &[ @@ -855,6 +874,7 @@ async fn e2e_prio3_fixed64vec_fixed_size() { let fp64_8_inv = fixed!(0.125: I1F63); let fp64_16_inv = fixed!(0.0625: I1F63); let result = run( + "e2e_prio3_fixed64vec_fixed_size", QueryKind::FixedSize, json!({"type": "Prio3FixedPoint64BitBoundedL2VecSum", "length": "3"}), &[ @@ -888,6 +908,7 @@ async fn e2e_prio3_fixed64vec_fixed_size() { #[tokio::test] async fn e2e_prio3_count_fixed_size() { let result = run( + "e2e_prio3_count_fixed_size", QueryKind::FixedSize, json!({"type": "Prio3Count"}), &[