Skip to content

Commit

Permalink
sui-core: use telemetry_subscribers::init_for_testing in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed Jun 2, 2022
1 parent 647123f commit f1d2462
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions crates/sui-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ curve25519-dalek = { version = "3", default-features = false }
thiserror = "1.0.30"
arc-swap = "1.5.0"


sui-adapter = { path = "../sui-adapter" }
sui-framework = { path = "../sui-framework" }
sui-network = { path = "../sui-network" }
Expand All @@ -49,8 +48,6 @@ sui-storage = { path = "../sui-storage" }
sui-config = { path = "../sui-config" }
sui-json = { path = "../sui-json" }

telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "2de1a391654a7ee09d867de2f16627b915ad21f0", features = ["jaeger", "opentelemetry", "opentelemetry-jaeger", "tracing-opentelemetry"] }

move-binary-format = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b" }
move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b" }
move-core-types = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b", features = ["address20"] }
Expand All @@ -72,8 +69,7 @@ serde_yaml = "0.8.23"
pretty_assertions = "1.2.1"
temp_testdir = "0.2.3"
hex = "0.4.3"
tracing-test = "0.2.1"
tracing-subscriber = "^0.3"
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "2de1a391654a7ee09d867de2f16627b915ad21f0" }

test-fuzz = "3.0.2"
test-utils = { path = "../test-utils" }
Expand Down
6 changes: 1 addition & 5 deletions crates/sui-core/src/unit_tests/authority_aggregator_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::collections::BTreeMap;
use std::sync::Arc;

use move_core_types::{account_address::AccountAddress, ident_str};
use once_cell::sync::Lazy;
use signature::Signer;

use sui_adapter::genesis;
Expand All @@ -31,8 +30,6 @@ pub fn authority_genesis_objects(
objects
}

static LOGGING_INIT: Lazy<()> = Lazy::new(tracing_subscriber::fmt::init);

pub async fn init_local_authorities(
genesis_objects: Vec<Vec<Object>>,
) -> (
Expand All @@ -50,8 +47,7 @@ pub async fn init_local_authorities_with_genesis(
AuthorityAggregator<LocalAuthorityClient>,
Vec<Arc<AuthorityState>>,
) {
#[allow(clippy::no_effect)]
*LOGGING_INIT; // Initialize logging if needed
telemetry_subscribers::init_for_testing();
let mut key_pairs = Vec::new();
let mut voting_rights = BTreeMap::new();
for _ in 0..genesis_objects.len() {
Expand Down

0 comments on commit f1d2462

Please sign in to comment.