Skip to content

Commit

Permalink
Disables several tests on Windows to avoid port conflicts (#8551)
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed May 18, 2024
1 parent 99b017e commit 1484d3d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions zebra-grpc/src/tests/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use crate::{
pub const ZECPAGES_SAPLING_VIEWING_KEY: &str = "zxviews1q0duytgcqqqqpqre26wkl45gvwwwd706xw608hucmvfalr759ejwf7qshjf5r9aa7323zulvz6plhttp5mltqcgs9t039cx2d09mgq05ts63n8u35hyv6h9nc9ctqqtue2u7cer2mqegunuulq2luhq3ywjcz35yyljewa4mgkgjzyfwh6fr6jd0dzd44ghk0nxdv2hnv4j5nxfwv24rwdmgllhe0p8568sgqt9ckt02v2kxf5ahtql6s0ltjpkckw8gtymxtxuu9gcr0swvz";

Check warning on line 29 in zebra-grpc/src/tests/snapshot.rs

View workflow job for this annotation

GitHub Actions / Test beta on windows-latest

constant `ZECPAGES_SAPLING_VIEWING_KEY` is never used

Check warning on line 29 in zebra-grpc/src/tests/snapshot.rs

View workflow job for this annotation

GitHub Actions / Test stable on windows-latest

constant `ZECPAGES_SAPLING_VIEWING_KEY` is never used

#[tokio::test(flavor = "multi_thread")]
#[cfg(not(target_os = "windows"))]
async fn test_grpc_response_data() {
let _init_guard = zebra_test::init();

Expand Down
1 change: 1 addition & 0 deletions zebra-grpc/src/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub const ZECPAGES_SAPLING_VIEWING_KEY: &str = "zxviews1q0duytgcqqqqpqre26wkl45g

/// Test the gRPC methods with mocked responses
#[tokio::test(flavor = "multi_thread")]
#[cfg(not(target_os = "windows"))]
async fn test_grpc_methods_mocked() {
let _init_guard = zebra_test::init();

Expand Down
2 changes: 2 additions & 0 deletions zebra-network/src/peer_set/initialize/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ async fn local_listener_unspecified_port_localhost_addr_v6() {

/// Test that zebra-network propagates fixed localhost listener ports to the `AddressBook`.
#[tokio::test]
#[cfg(not(target_os = "windows"))]
async fn local_listener_fixed_port_localhost_addr_v4() {
let _init_guard = zebra_test::init();

Expand All @@ -161,6 +162,7 @@ async fn local_listener_fixed_port_localhost_addr_v4() {

/// Test that zebra-network propagates fixed localhost listener ports to the `AddressBook`.
#[tokio::test]
#[cfg(not(target_os = "windows"))]
async fn local_listener_fixed_port_localhost_addr_v6() {
let _init_guard = zebra_test::init();

Expand Down
1 change: 1 addition & 0 deletions zebra-rpc/src/server/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ fn rpc_server_spawn_single_thread() {

/// Test that the JSON-RPC server spawns when configured with multiple threads.
#[test]
#[cfg(not(target_os = "windows"))]
fn rpc_server_spawn_parallel_threads() {
rpc_server_spawn(true)
}
Expand Down
14 changes: 9 additions & 5 deletions zebrad/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ fn full_sync_testnet() -> Result<()> {
)
}

#[cfg(feature = "prometheus")]
#[cfg(all(feature = "prometheus", not(target_os = "windows")))]
#[tokio::test]
async fn metrics_endpoint() -> Result<()> {
use hyper::Client;
Expand Down Expand Up @@ -1451,7 +1451,7 @@ async fn metrics_endpoint() -> Result<()> {
Ok(())
}

#[cfg(feature = "filter-reload")]
#[cfg(all(feature = "filter-reload", not(target_os = "windows")))]
#[tokio::test]
async fn tracing_endpoint() -> Result<()> {
use hyper::{Body, Client, Request};
Expand Down Expand Up @@ -1549,13 +1549,15 @@ async fn tracing_endpoint() -> Result<()> {
/// Test that the JSON-RPC endpoint responds to a request,
/// when configured with a single thread.
#[tokio::test]
#[cfg(not(target_os = "windows"))]
async fn rpc_endpoint_single_thread() -> Result<()> {
rpc_endpoint(false).await
}

/// Test that the JSON-RPC endpoint responds to a request,
/// when configured with multiple threads.
#[tokio::test]
#[cfg(not(target_os = "windows"))]
async fn rpc_endpoint_parallel_threads() -> Result<()> {
rpc_endpoint(true).await
}
Expand Down Expand Up @@ -1623,6 +1625,7 @@ async fn rpc_endpoint(parallel_cpu_threads: bool) -> Result<()> {
///
/// https://zcash.github.io/rpc/getblockchaininfo.html
#[tokio::test]
#[cfg(not(target_os = "windows"))]
async fn rpc_endpoint_client_content_type() -> Result<()> {
let _init_guard = zebra_test::init();
if zebra_test::net::zebra_skip_network_tests() {
Expand Down Expand Up @@ -2148,6 +2151,7 @@ fn lightwalletd_integration_test(test_type: TestType) -> Result<()> {
/// It is expected that the first node spawned will get exclusive use of the port.
/// The second node will panic with the Zcash listener conflict hint added in #1535.
#[test]
#[cfg(not(target_os = "windows"))]
fn zebra_zcash_listener_conflict() -> Result<()> {
let _init_guard = zebra_test::init();

Expand Down Expand Up @@ -2176,7 +2180,7 @@ fn zebra_zcash_listener_conflict() -> Result<()> {
/// exclusive use of the port. The second node will panic with the Zcash metrics
/// conflict hint added in #1535.
#[test]
#[cfg(feature = "prometheus")]
#[cfg(all(feature = "prometheus", not(target_os = "windows")))]
fn zebra_metrics_conflict() -> Result<()> {
let _init_guard = zebra_test::init();

Expand Down Expand Up @@ -2205,7 +2209,7 @@ fn zebra_metrics_conflict() -> Result<()> {
/// exclusive use of the port. The second node will panic with the Zcash tracing
/// conflict hint added in #1535.
#[test]
#[cfg(feature = "filter-reload")]
#[cfg(all(feature = "filter-reload", not(target_os = "windows")))]
fn zebra_tracing_conflict() -> Result<()> {
let _init_guard = zebra_test::init();

Expand Down Expand Up @@ -2944,7 +2948,7 @@ fn scan_task_starts() -> Result<()> {

/// Test that the scanner gRPC server starts when the node starts.
#[tokio::test]
#[cfg(feature = "shielded-scan")]
#[cfg(all(feature = "shielded-scan", not(target_os = "windows")))]
async fn scan_rpc_server_starts() -> Result<()> {
use zebra_grpc::scanner::{scanner_client::ScannerClient, Empty};

Expand Down

0 comments on commit 1484d3d

Please sign in to comment.