Skip to content

Commit

Permalink
streamer: put testing_utilities.rs behind dev-context-only-utils (#3442)
Browse files Browse the repository at this point in the history
* streamer: put testing_utilities.rs behind dev-context-only-utils

* fix feature activation in tests
  • Loading branch information
kevinheavey authored Nov 2, 2024
1 parent b6eacb1 commit 59bf0f0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ test-case = { workspace = true }
sysctl = { workspace = true }

[features]
dev-context-only-utils = ["solana-runtime/dev-context-only-utils"]
dev-context-only-utils = [
"solana-runtime/dev-context-only-utils",
"solana-streamer/dev-context-only-utils",
]
frozen-abi = [
"dep:solana-frozen-abi",
"dep:solana-frozen-abi-macro",
Expand Down
6 changes: 5 additions & 1 deletion streamer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async-channel = { workspace = true }
bytes = { workspace = true }
crossbeam-channel = { workspace = true }
dashmap = { workspace = true }
futures = { workspace = true }
futures = { workspace = true }
futures-util = { workspace = true }
governor = { workspace = true }
histogram = { workspace = true }
Expand Down Expand Up @@ -44,6 +44,10 @@ x509-parser = { workspace = true }
[dev-dependencies]
assert_matches = { workspace = true }
solana-logger = { workspace = true }
solana-streamer = { path = ".", features = ["dev-context-only-utils"] }

[features]
dev-context-only-utils = []

[lib]
crate-type = ["lib"]
Expand Down
1 change: 1 addition & 0 deletions streamer/src/nonblocking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ pub mod quic;
pub mod recvmmsg;
pub mod sendmmsg;
mod stream_throttle;
#[cfg(feature = "dev-context-only-utils")]
pub mod testing_utilities;
1 change: 1 addition & 0 deletions tpu-client-next/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tokio-util = { workspace = true }
crossbeam-channel = { workspace = true }
futures = { workspace = true }
solana-cli-config = { workspace = true }
solana-streamer = { workspace = true, features = ["dev-context-only-utils"] }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

0 comments on commit 59bf0f0

Please sign in to comment.